Skip to contentSkip to conversation

cifs: print client_guid in DebugData

PATCH In review Shyam Prasad N 3 participants 3 messages Jun 27, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: print client_guid in DebugData

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.

---
 fs/smb/client/cifs_debug.c | 1 +
 1 file changed, 1 insertion(+)
fs/smb/client/cifs_debug.c +1 -0
index 079c1df09172..f5af080ac100 100644
@@ -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)
Signature · 1 line
2.34.1
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Shyam Prasad N

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.

Quoted 10 lines
---
  fs/smb/client/cifs_debug.c | 1 +
  1 file changed, 1 insertion(+)
fs/smb/client/cifs_debug.c +0 -0
index 079c1df09172..f5af080ac100 100644

fs/smb/client/cifs_debug.c static int cifs_debug_data_proc_show(struct seq_file *m, void *v) · line 351

Quoted 5 lines
fs/smb/client/cifs_debug.c +1 -0
@@ -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:

Quoted 2 lines
fs/smb/client/cifs_debug.c +0 -0
  #ifdef CONFIG_CIFS_SMB_DIRECT
  		if (!server->rdma)
#2 lore raw

added acked-by and merged into cifs-2.6.git for-next

Quoted 35 lines · Tom Talpey
Quoted 5 lines · Shyam Prasad N

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.

Quoted 10 lines
---
  fs/smb/client/cifs_debug.c | 1 +
  1 file changed, 1 insertion(+)
fs/smb/client/cifs_debug.c +0 -0
index 079c1df09172..f5af080ac100 100644

fs/smb/client/cifs_debug.c static int cifs_debug_data_proc_show(struct seq_file *m, void *v) · line 351

Quoted 5 lines
fs/smb/client/cifs_debug.c +1 -0
@@ -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:

Quoted 2 lines
fs/smb/client/cifs_debug.c +0 -0
  #ifdef CONFIG_CIFS_SMB_DIRECT
              if (!server->rdma)
Signature · 3 lines
Thanks,

Steve