Skip to contentSkip to conversation

cifs: show features compiled in as part of DebugData

PATCH In review Suresh Jayaraman 2 participants 2 messages Jul 30, 2010

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

PATCH 1/2 cifs: show features compiled in as part of DebugData

From: Suresh Jayaraman <[email protected]>
Subject: [PATCH 1/2] cifs: show features compiled in as part of DebugData

This patch adds the features that are compiled in to the CIFS debugging data as shown below:

$cat /proc/fs/cifs/DebugData
Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 1.64
Features: dfs fscache posix spnego xattr Active VFS Requests: 0
...

This patch provides a definitive way to tell what features are currently enabled in the running kernel. This could also help debugging.

---
 fs/cifs/cifs_debug.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
fs/cifs/cifs_debug.c +26 -0
index 4fce6e6..fdb2db5 100644
@@ -119,6 +119,32 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 		    "Display Internal CIFS Data Structures for Debugging\n"
 		    "---------------------------------------------------\n");
 	seq_printf(m, "CIFS Version %s\n", CIFS_VERSION);
+	seq_printf(m, "Features: ");
+#ifdef CONFIG_CIFS_DFS_UPCALL
+	seq_printf(m, "dfs");
+	seq_putc(m, ' ');
+#endif
+#ifdef CONFIG_CIFS_FSCACHE
+	seq_printf(m, "fscache");
+	seq_putc(m, ' ');
+#endif
+#ifdef CONFIG_CIFS_WEAK_PW_HASH
+	seq_printf(m, "lanman");
+	seq_putc(m, ' ');
+#endif
+#ifdef CONFIG_CIFS_POSIX
+	seq_printf(m, "posix");
+	seq_putc(m, ' ');
+#endif
+#ifdef CONFIG_CIFS_UPCALL
+	seq_printf(m, "spnego");
+	seq_putc(m, ' ');
+#endif
+#ifdef CONFIG_CIFS_XATTR
+	seq_printf(m, "xattr");
+	seq_putc(m, ' ');
+#endif
+	seq_putc(m, '\n');
 	seq_printf(m, "Active VFS Requests: %d\n", GlobalTotalActiveXid);
 	seq_printf(m, "Servers:");
 
#1 lore raw
Quoted 45 lines · On Fri, 30 Jul 2010 17:57:22 +0530 Suresh Jayaraman…

From: Suresh Jayaraman <[email protected]>
Subject: [PATCH 1/2] cifs: show features compiled in as part of DebugData

This patch adds the features that are compiled in to the CIFS debugging data as shown below:

$cat /proc/fs/cifs/DebugData
Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
CIFS Version 1.64
Features: dfs fscache posix spnego xattr Active VFS Requests: 0
...

This patch provides a definitive way to tell what features are currently enabled in the running kernel. This could also help debugging.

---
 fs/cifs/cifs_debug.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
fs/cifs/cifs_debug.c +14 -0
index 4fce6e6..fdb2db5 100644
@@ -119,6 +119,32 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 		    "Display Internal CIFS Data Structures for Debugging\n"
 		    "---------------------------------------------------\n");
 	seq_printf(m, "CIFS Version %s\n", CIFS_VERSION);
+	seq_printf(m, "Features: ");
+#ifdef CONFIG_CIFS_DFS_UPCALL
+	seq_printf(m, "dfs");
+	seq_putc(m, ' ');
+#endif
+#ifdef CONFIG_CIFS_FSCACHE
+	seq_printf(m, "fscache");
+	seq_putc(m, ' ');
+#endif
+#ifdef CONFIG_CIFS_WEAK_PW_HASH
+	seq_printf(m, "lanman");
+	seq_putc(m, ' ');
+#endif
+#ifdef CONFIG_CIFS_POSIX

fs/cifs/cifs_debug.c static int cifs_debug_data_proc_show(struct seq_file *m, void *v) · line 145

Quoted 10 lines
fs/cifs/cifs_debug.c +10 -0
+	seq_printf(m, "posix");
+	seq_putc(m, ' ');
+#endif
+#ifdef CONFIG_CIFS_UPCALL
+	seq_printf(m, "spnego");
+	seq_putc(m, ' ');
+#endif
+#ifdef CONFIG_CIFS_XATTR
+	seq_printf(m, "xattr");
+	seq_putc(m, ' ');
	^^^^^^
	Nit -- this space isn't needed.

fs/cifs/cifs_debug.c static int cifs_debug_data_proc_show(struct seq_file *m, void *v) · line 150

Quoted 7 lines
fs/cifs/cifs_debug.c +2 -0
+#endif
+	seq_putc(m, '\n');
 	seq_printf(m, "Active VFS Requests: %d\n", GlobalTotalActiveXid);
 	seq_printf(m, "Servers:");
 

Other than that, looks good.

Signature · 1 line
Jeff Layton <[email protected]>