Skip to content

Commit 2a44b38

Browse files
sprasad-microsoftsmfrench
authored andcommitted
cifs: print all credit counters in DebugData
Output of /proc/fs/cifs/DebugData shows only the per-connection counter for the number of credits of regular type. i.e. the credits reserved for echo and oplocks are not displayed. There have been situations recently where having this info would have been useful. This change prints the credit counters of all three types: regular, echo, oplocks. Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 91f4480 commit 2a44b38

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

fs/smb/client/cifs_debug.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,14 @@ cifs_dump_channel(struct seq_file *m, int i, struct cifs_chan *chan)
130130
struct TCP_Server_Info *server = chan->server;
131131

132132
seq_printf(m, "\n\n\t\tChannel: %d ConnectionId: 0x%llx"
133-
"\n\t\tNumber of credits: %d Dialect 0x%x"
133+
"\n\t\tNumber of credits: %d,%d,%d Dialect 0x%x"
134134
"\n\t\tTCP status: %d Instance: %d"
135135
"\n\t\tLocal Users To Server: %d SecMode: 0x%x Req On Wire: %d"
136136
"\n\t\tIn Send: %d In MaxReq Wait: %d",
137137
i+1, server->conn_id,
138138
server->credits,
139+
server->echo_credits,
140+
server->oplock_credits,
139141
server->dialect,
140142
server->tcpStatus,
141143
server->reconnect_instance,
@@ -350,8 +352,11 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
350352
atomic_read(&server->smbd_conn->mr_used_count));
351353
skip_rdma:
352354
#endif
353-
seq_printf(m, "\nNumber of credits: %d Dialect 0x%x",
354-
server->credits, server->dialect);
355+
seq_printf(m, "\nNumber of credits: %d,%d,%d Dialect 0x%x",
356+
server->credits,
357+
server->echo_credits,
358+
server->oplock_credits,
359+
server->dialect);
355360
if (server->compress_algorithm == SMB3_COMPRESS_LZNT1)
356361
seq_printf(m, " COMPRESS_LZNT1");
357362
else if (server->compress_algorithm == SMB3_COMPRESS_LZ77)

0 commit comments

Comments
 (0)