diff mbox series

[SMB3] Display session id in /proc/fs/cifs/DebugData

Message ID CAH2r5mtP-mPWTO0gCHraUg6m=V5WNH0u1dOnd=k4114Z8AVE6w@mail.gmail.com
State New
Headers show
Series [SMB3] Display session id in /proc/fs/cifs/DebugData | expand

Commit Message

Steve French May 9, 2019, 4:37 a.m. UTC
Pavel noticed that we don't display the session id in
/proc/fs/cifs/DebugData yet it is important.  Patch to add this
attached

--
Thanks,

Steve

Comments

Pavel Shilovsky May 9, 2019, 5:07 p.m. UTC | #1
ср, 8 мая 2019 г. в 21:37, Steve French <smfrench@gmail.com>:
>
> Pavel noticed that we don't display the session id in
> /proc/fs/cifs/DebugData yet it is important.  Patch to add this
> attached

Could you make it hex to align with other IDs we are printing in
DebugData or open_files?

--
Best regards,
Pavel Shilovsky
Steve French May 9, 2019, 5:12 p.m. UTC | #2
On Thu, May 9, 2019 at 12:07 PM Pavel Shilovsky <piastryyy@gmail.com> wrote:
>
> ср, 8 мая 2019 г. в 21:37, Steve French <smfrench@gmail.com>:
> >
> > Pavel noticed that we don't display the session id in
> > /proc/fs/cifs/DebugData yet it is important.  Patch to add this
> > attached
>
> Could you make it hex to align with other IDs we are printing in
> DebugData or open_files?

Sure - that is easy
diff mbox series

Patch

From f7de337f9cff0470d0d1db0494a1d1fcd1a98e1b Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Wed, 8 May 2019 22:41:37 -0500
Subject: [PATCH] smb3: display session id in debug data

Displaying the session id in /proc/fs/cifs/DebugData
is needed in order to correlate Linux client information
with network and server traces for many common support
scenarios.

Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/cifs_debug.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 6a69f11aacf7..bef78b3a93d3 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -380,6 +380,8 @@  static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 				atomic_read(&server->in_send),
 				atomic_read(&server->num_waiters));
 #endif
+			/* dump session id helpful for use with network trace */
+			seq_printf(m, " SessionId: %llu", ses->Suid);
 			if (ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA)
 				seq_puts(m, " encrypted");
 			if (ses->sign)
-- 
2.20.1