Skip to content

Commit f78b83d

Browse files
bharathsm-mssmfrench
authored andcommitted
smb: client: show smb lease key in open_dirs output
Show cached directory smb lease key in /proc/fs/cifs/open_dirs for debugging purposes. Signed-off-by: Bharath SM <bharathsm@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 9cfcd86 commit f78b83d

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

fs/smb/client/cifs_debug.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ static int cifs_debug_dirs_proc_show(struct seq_file *m, void *v)
324324

325325
seq_puts(m, "# Version:1\n");
326326
seq_puts(m, "# Format:\n");
327-
seq_puts(m, "# <tree id> <sess id> <persistent fid> <path>\n");
327+
seq_puts(m, "# <tree id> <sess id> <persistent fid> <lease-key> <path>\n");
328328

329329
spin_lock(&cifs_tcp_ses_lock);
330330
list_for_each(stmp, &cifs_tcp_ses_list) {
@@ -343,11 +343,15 @@ static int cifs_debug_dirs_proc_show(struct seq_file *m, void *v)
343343
(unsigned long)atomic_long_read(&cfids->total_dirents_entries),
344344
(unsigned long long)atomic64_read(&cfids->total_dirents_bytes));
345345
list_for_each_entry(cfid, &cfids->entries, entry) {
346-
seq_printf(m, "0x%x 0x%llx 0x%llx %s",
346+
seq_printf(m, "0x%x 0x%llx 0x%llx ",
347347
tcon->tid,
348348
ses->Suid,
349-
cfid->fid.persistent_fid,
350-
cfid->path);
349+
cfid->fid.persistent_fid);
350+
if (cfid->has_lease)
351+
seq_printf(m, "%pUl ", cfid->fid.lease_key);
352+
else
353+
seq_puts(m, "- ");
354+
seq_printf(m, "%s", cfid->path);
351355
if (cfid->file_all_info_is_valid)
352356
seq_printf(m, "\tvalid file info");
353357
if (cfid->dirents.is_valid)

0 commit comments

Comments
 (0)