From: Bharath SM <bharathsm.hsk@gmail.com>
To: linux-cifs@vger.kernel.org, sprasad@microsoft.com, smfrench@gmail.com
Cc: Bharath SM <bharathsm@microsoft.com>
Subject: [PATCH 2/3] smb: client: show smb lease key in open_dirs output
Date: Thu, 30 Oct 2025 22:31:15 +0530 [thread overview]
Message-ID: <20251030170116.31239-2-bharathsm@microsoft.com> (raw)
In-Reply-To: <20251030170116.31239-1-bharathsm@microsoft.com>
Show cached directory smb lease key in /proc/fs/cifs/open_dirs
for debugging purposes.
Signed-off-by: Bharath SM <bharathsm@microsoft.com>
---
fs/smb/client/cifs_debug.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
index 1383caa5a034..7fdcaf9feb16 100644
--- a/fs/smb/client/cifs_debug.c
+++ b/fs/smb/client/cifs_debug.c
@@ -324,7 +324,7 @@ static int cifs_debug_dirs_proc_show(struct seq_file *m, void *v)
seq_puts(m, "# Version:1\n");
seq_puts(m, "# Format:\n");
- seq_puts(m, "# <tree id> <sess id> <persistent fid> <path>\n");
+ seq_puts(m, "# <tree id> <sess id> <persistent fid> <lease-key> <path>\n");
spin_lock(&cifs_tcp_ses_lock);
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)
(unsigned long)atomic_long_read(&cfids->total_dirents_entries),
(unsigned long long)atomic64_read(&cfids->total_dirents_bytes));
list_for_each_entry(cfid, &cfids->entries, entry) {
- seq_printf(m, "0x%x 0x%llx 0x%llx %s",
+ seq_printf(m, "0x%x 0x%llx 0x%llx ",
tcon->tid,
ses->Suid,
- cfid->fid.persistent_fid,
- cfid->path);
+ cfid->fid.persistent_fid);
+ if (cfid->has_lease)
+ seq_printf(m, "%pUl ", cfid->fid.lease_key);
+ else
+ seq_puts(m, "- ");
+ seq_printf(m, "%s", cfid->path);
if (cfid->file_all_info_is_valid)
seq_printf(m, "\tvalid file info");
if (cfid->dirents.is_valid)
--
2.48.1
next prev parent reply other threads:[~2025-10-30 17:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 17:01 [PATCH 1/3] smb: client: show smb lease key in open_files output Bharath SM
2025-10-30 17:01 ` Bharath SM [this message]
2025-10-30 17:01 ` [PATCH 3/3] smb: client: show directory lease state in /proc/fs/cifs/open_dirs Bharath SM
2025-10-30 21:56 ` Paulo Alcantara
2025-10-30 22:08 ` Enzo Matsumiya
2025-10-30 22:14 ` Paulo Alcantara
2025-10-31 3:18 ` Shyam Prasad N
2025-10-31 12:55 ` Enzo Matsumiya
2025-10-31 17:32 ` Steve French
2025-10-31 3:19 ` Shyam Prasad N
2025-10-31 7:31 ` Bharath SM
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251030170116.31239-2-bharathsm@microsoft.com \
--to=bharathsm.hsk@gmail.com \
--cc=bharathsm@microsoft.com \
--cc=linux-cifs@vger.kernel.org \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox