diff mbox

cifs: add missing debug entries for kconfig options

Message ID CAH2r5mtbi1HO39zALiK2FUfxDVuHxJSaoDT15GZ62cbtensz7Q@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve French June 28, 2018, 11:52 p.m. UTC
/proc/fs/cifs/DebugData displays the features (Kconfig options)
used to build cifs.ko but it was missing some, and needed comma
separator.  These can be useful in debugging certain problems
so we know which optional features were enabled in the user's build.
Also clarify them, by making them more closely match the
corresponding CONFIG_CIFS_* parm.

Old format:
Features: dfs fscache posix spnego xattr acl

New format:
Features: DFS,FSCACHE,SMB_DIRECT,STATS,DEBUG2,ALLOW_INSECURE_LEGACY,CIFS_POSIX,UPCALL(SPNEGO),XATTR,ACL

Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
---
 fs/cifs/cifs_debug.c | 30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)

     seq_printf(m, "Active VFS Requests: %d\n", GlobalTotalActiveXid);

Comments

Paulo Alcantara (SUSE) June 29, 2018, 12:05 a.m. UTC | #1
Steve French <smfrench@gmail.com> writes:

> /proc/fs/cifs/DebugData displays the features (Kconfig options)
> used to build cifs.ko but it was missing some, and needed comma
> separator.  These can be useful in debugging certain problems
> so we know which optional features were enabled in the user's build.
> Also clarify them, by making them more closely match the
> corresponding CONFIG_CIFS_* parm.
>
> Old format:
> Features: dfs fscache posix spnego xattr acl
>
> New format:
> Features: DFS,FSCACHE,SMB_DIRECT,STATS,DEBUG2,ALLOW_INSECURE_LEGACY,CIFS_POSIX,UPCALL(SPNEGO),XATTR,ACL
>
> Signed-off-by: Steve French <stfrench@microsoft.com>
> CC: Stable <stable@vger.kernel.org>

Looks good,

Reviewed-by: Paulo Alcantara <palcantara@suse.de>

             Paulo
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ronnie Sahlberg June 29, 2018, 12:07 a.m. UTC | #2
I really like that the words map directly to CONFIG_CIFS_<xxx>
that will make is obvious what each entry in the feature list actually means.

----- Original Message -----
From: "Paulo Alcantara" <paulo@paulo.ac>
To: "Steve French" <smfrench@gmail.com>, "CIFS" <linux-cifs@vger.kernel.org>
Sent: Friday, 29 June, 2018 10:05:14 AM
Subject: Re: [PATCH] cifs: add missing debug entries for kconfig options

Steve French <smfrench@gmail.com> writes:

> /proc/fs/cifs/DebugData displays the features (Kconfig options)
> used to build cifs.ko but it was missing some, and needed comma
> separator.  These can be useful in debugging certain problems
> so we know which optional features were enabled in the user's build.
> Also clarify them, by making them more closely match the
> corresponding CONFIG_CIFS_* parm.
>
> Old format:
> Features: dfs fscache posix spnego xattr acl
>
> New format:
> Features: DFS,FSCACHE,SMB_DIRECT,STATS,DEBUG2,ALLOW_INSECURE_LEGACY,CIFS_POSIX,UPCALL(SPNEGO),XATTR,ACL
>
> Signed-off-by: Steve French <stfrench@microsoft.com>
> CC: Stable <stable@vger.kernel.org>

Looks good,

Reviewed-by: Paulo Alcantara <palcantara@suse.de>

             Paulo
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pavel Shilovsky June 29, 2018, 1:44 p.m. UTC | #3
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>

--
Best regards,
Pavel Shilovsky

чт, 28 июн. 2018 г. в 23:28, Ronnie Sahlberg <lsahlber@redhat.com>:
>
> I really like that the words map directly to CONFIG_CIFS_<xxx>
> that will make is obvious what each entry in the feature list actually means.
>
> ----- Original Message -----
> From: "Paulo Alcantara" <paulo@paulo.ac>
> To: "Steve French" <smfrench@gmail.com>, "CIFS" <linux-cifs@vger.kernel.org>
> Sent: Friday, 29 June, 2018 10:05:14 AM
> Subject: Re: [PATCH] cifs: add missing debug entries for kconfig options
>
> Steve French <smfrench@gmail.com> writes:
>
> > /proc/fs/cifs/DebugData displays the features (Kconfig options)
> > used to build cifs.ko but it was missing some, and needed comma
> > separator.  These can be useful in debugging certain problems
> > so we know which optional features were enabled in the user's build.
> > Also clarify them, by making them more closely match the
> > corresponding CONFIG_CIFS_* parm.
> >
> > Old format:
> > Features: dfs fscache posix spnego xattr acl
> >
> > New format:
> > Features: DFS,FSCACHE,SMB_DIRECT,STATS,DEBUG2,ALLOW_INSECURE_LEGACY,CIFS_POSIX,UPCALL(SPNEGO),XATTR,ACL
> >
> > Signed-off-by: Steve French <stfrench@microsoft.com>
> > CC: Stable <stable@vger.kernel.org>
>
> Looks good,
>
> Reviewed-by: Paulo Alcantara <palcantara@suse.de>
>
>              Paulo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

From 4fe9a636f1cdd0853ff36902477bbfabdd7fd098 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Thu, 28 Jun 2018 18:46:40 -0500
Subject: [PATCH] cifs: add missing debug entries for kconfig options

/proc/fs/cifs/DebugData displays the features (Kconfig options)
used to build cifs.ko but it was missing some, and needed comma
separator.  These can be useful in debugging certain problems
so we know which optional features were enabled in the user's build.
Also clarify them, by making them more closely match the
corresponding CONFIG_CIFS_* parm.

Old format:
Features: dfs fscache posix spnego xattr acl

New format:
Features: DFS,FSCACHE,SMB_DIRECT,STATS,DEBUG2,ALLOW_INSECURE_LEGACY,CIFS_POSIX,UPCALL(SPNEGO),XATTR,ACL

Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
---
 fs/cifs/cifs_debug.c | 30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index bfe999505815..72f72d1935b1 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -160,25 +160,41 @@  static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 	seq_printf(m, "CIFS Version %s\n", CIFS_VERSION);
 	seq_printf(m, "Features:");
 #ifdef CONFIG_CIFS_DFS_UPCALL
-	seq_printf(m, " dfs");
+	seq_printf(m, " DFS");
 #endif
 #ifdef CONFIG_CIFS_FSCACHE
-	seq_printf(m, " fscache");
+	seq_printf(m, ",FSCACHE");
+#endif
+#ifdef CONFIG_CIFS_SMB_DIRECT
+	seq_printf(m, ",SMB_DIRECT");
+#endif
+#ifdef  CONFIG_CIFS_STATS2
+	seq_printf(m, ",STATS2");
+#elif   CONFIG_CIFS_STATS
+	seq_printf(m, ",STATS");
+#endif
+#ifdef  CONFIG_CIFS_DEBUG2
+	seq_printf(m, ",DEBUG2");
+#elif   CONFIG_CIFS_DEBUG
+	seq_printf(m, ",DEBUG");
+#endif
+#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
+	seq_printf(m, ",ALLOW_INSECURE_LEGACY");
 #endif
 #ifdef CONFIG_CIFS_WEAK_PW_HASH
-	seq_printf(m, " lanman");
+	seq_printf(m, ",WEAK_PW_HASH");
 #endif
 #ifdef CONFIG_CIFS_POSIX
-	seq_printf(m, " posix");
+	seq_printf(m, ",CIFS_POSIX");
 #endif
 #ifdef CONFIG_CIFS_UPCALL
-	seq_printf(m, " spnego");
+	seq_printf(m, ",UPCALL(SPNEGO)");
 #endif
 #ifdef CONFIG_CIFS_XATTR
-	seq_printf(m, " xattr");
+	seq_printf(m, ",XATTR");
 #endif
 #ifdef CONFIG_CIFS_ACL
-	seq_printf(m, " acl");
+	seq_printf(m, ",ACL");
 #endif
 	seq_putc(m, '\n');
 	seq_printf(m, "Active VFS Requests: %d\n", GlobalTotalActiveXid);
-- 
2.17.1