diff mbox series

cifs: print client_guid in DebugData

Message ID 20230627120943.16688-1-sprasad@microsoft.com (mailing list archive)
State New, archived
Headers show
Series cifs: print client_guid in DebugData | expand

Commit Message

Shyam Prasad N June 27, 2023, 12:09 p.m. UTC
Having the ClientGUID info makes it easier to debug
issues related to a client on a server that serves a
number of clients.

This change prints the ClientGUID in DebugData.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
---
 fs/smb/client/cifs_debug.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tom Talpey June 27, 2023, 7:28 p.m. UTC | #1
On 6/27/2023 8:09 AM, Shyam Prasad N wrote:
> Having the ClientGUID info makes it easier to debug
> issues related to a client on a server that serves a
> number of clients.
> 
> This change prints the ClientGUID in DebugData.

Good idea.

> Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
> ---
>   fs/smb/client/cifs_debug.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
> index 079c1df09172..f5af080ac100 100644
> --- a/fs/smb/client/cifs_debug.c
> +++ b/fs/smb/client/cifs_debug.c
> @@ -347,6 +347,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
>   		spin_lock(&server->srv_lock);
>   		if (server->hostname)
>   			seq_printf(m, "Hostname: %s ", server->hostname);
> +		seq_printf(m, "\nClientGUID: %pUL", server->client_guid);
>   		spin_unlock(&server->srv_lock);

It's a totally minor thing, but does this code really need to
take the server lock? These elements never change anyway.

In any case:

Acked-by: Tom Talpey <tom@talpey.com>

>   #ifdef CONFIG_CIFS_SMB_DIRECT
>   		if (!server->rdma)
Steve French June 27, 2023, 10:55 p.m. UTC | #2
added acked-by and merged into cifs-2.6.git for-next

On Tue, Jun 27, 2023 at 2:28 PM Tom Talpey <tom@talpey.com> wrote:
>
> On 6/27/2023 8:09 AM, Shyam Prasad N wrote:
> > Having the ClientGUID info makes it easier to debug
> > issues related to a client on a server that serves a
> > number of clients.
> >
> > This change prints the ClientGUID in DebugData.
>
> Good idea.
>
> > Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
> > ---
> >   fs/smb/client/cifs_debug.c | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
> > index 079c1df09172..f5af080ac100 100644
> > --- a/fs/smb/client/cifs_debug.c
> > +++ b/fs/smb/client/cifs_debug.c
> > @@ -347,6 +347,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
> >               spin_lock(&server->srv_lock);
> >               if (server->hostname)
> >                       seq_printf(m, "Hostname: %s ", server->hostname);
> > +             seq_printf(m, "\nClientGUID: %pUL", server->client_guid);
> >               spin_unlock(&server->srv_lock);
>
> It's a totally minor thing, but does this code really need to
> take the server lock? These elements never change anyway.
>
> In any case:
>
> Acked-by: Tom Talpey <tom@talpey.com>
>
> >   #ifdef CONFIG_CIFS_SMB_DIRECT
> >               if (!server->rdma)
diff mbox series

Patch

diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
index 079c1df09172..f5af080ac100 100644
--- a/fs/smb/client/cifs_debug.c
+++ b/fs/smb/client/cifs_debug.c
@@ -347,6 +347,7 @@  static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 		spin_lock(&server->srv_lock);
 		if (server->hostname)
 			seq_printf(m, "Hostname: %s ", server->hostname);
+		seq_printf(m, "\nClientGUID: %pUL", server->client_guid);
 		spin_unlock(&server->srv_lock);
 #ifdef CONFIG_CIFS_SMB_DIRECT
 		if (!server->rdma)