summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnzo Matsumiya <ematsumiya@suse.de>2025-05-02 16:19:37 -0300
committerEnzo Matsumiya <ematsumiya@suse.de>2025-05-02 16:19:37 -0300
commit82a3fee58fd4e1632e5a2fa7206c47741da67dc9 (patch)
tree32b3430a356f8df13ca2da8d1968149da197292a
parent1b7695cd836b6bf056c4856395e32c835f50a1fc (diff)
downloadlinux-82a3fee58fd4e1632e5a2fa7206c47741da67dc9.tar.gz
linux-82a3fee58fd4e1632e5a2fa7206c47741da67dc9.tar.bz2
linux-82a3fee58fd4e1632e5a2fa7206c47741da67dc9.zip
smb: client: show cached dirs in DebugData
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
-rw-r--r--fs/smb/client/cifs_debug.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
index e03c890de0a0..6314e20f4a53 100644
--- a/fs/smb/client/cifs_debug.c
+++ b/fs/smb/client/cifs_debug.c
@@ -26,6 +26,7 @@
#include "smbdirect.h"
#endif
#include "cifs_swn.h"
+#include "cached_dir.h"
void
cifs_dump_mem(char *label, void *data, int length)
@@ -129,6 +130,21 @@ static void cifs_debug_tcon(struct seq_file *m, struct cifs_tcon *tcon)
seq_printf(m, "\n\tDFS origin fullpath: %s",
tcon->origin_fullpath);
}
+ if (tcon->cfids) {
+ struct cached_fid *cfid;
+
+ seq_puts(m, "\n\tCached dirs:");
+ list_for_each_entry(cfid, &tcon->cfids->entries, entry) {
+ const char *path = cfid->path;
+
+ if (path && !*path)
+ /* this is just representative */
+ path = "\\";
+
+ seq_printf(m, "\n\t\tpath=%s, has_lease=%s, open=%s", path, str_yes_no(cfid->has_lease), str_yes_no(cfid->is_open));
+ }
+ seq_puts(m, "\n");
+ }
spin_unlock(&tcon->tc_lock);
seq_putc(m, '\n');
}