diff mbox series

[01/14] cifs: print server capabilities in DebugData

Message ID 20231030110020.45627-1-sprasad@microsoft.com
State New
Headers show
Series [01/14] cifs: print server capabilities in DebugData | expand

Commit Message

Shyam Prasad N Oct. 30, 2023, 11 a.m. UTC
From: Shyam Prasad N <sprasad@microsoft.com>

In the output of /proc/fs/cifs/DebugData, we do not
print the server->capabilities field today.
With this change, we will do that.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
---
 fs/smb/client/cifs_debug.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bharath SM Oct. 30, 2023, 12:34 p.m. UTC | #1
On Mon, Oct 30, 2023 at 4:30 PM <nspmangalore@gmail.com> wrote:
>
> From: Shyam Prasad N <sprasad@microsoft.com>
>
> In the output of /proc/fs/cifs/DebugData, we do not
> print the server->capabilities field today.
> With this change, we will do that.

We already print session capabilities in DebugData. How is it
different from that.?
Shyam Prasad N Oct. 30, 2023, 12:40 p.m. UTC | #2
On Mon, Oct 30, 2023 at 6:04 PM Bharath SM <bharathsm.hsk@gmail.com> wrote:
>
> On Mon, Oct 30, 2023 at 4:30 PM <nspmangalore@gmail.com> wrote:
> >
> > From: Shyam Prasad N <sprasad@microsoft.com>
> >
> > In the output of /proc/fs/cifs/DebugData, we do not
> > print the server->capabilities field today.
> > With this change, we will do that.
>
> We already print session capabilities in DebugData. How is it
> different from that.?

These are capabilities at the server level. That one is at session level.
Actually, there's tcon capabilities as well, which I think we should
also dump in DebugData.
I'll submit a revised version for that as well.
Shyam Prasad N Oct. 30, 2023, 12:51 p.m. UTC | #3
On Mon, Oct 30, 2023 at 6:10 PM Shyam Prasad N <nspmangalore@gmail.com> wrote:
>
> On Mon, Oct 30, 2023 at 6:04 PM Bharath SM <bharathsm.hsk@gmail.com> wrote:
> >
> > On Mon, Oct 30, 2023 at 4:30 PM <nspmangalore@gmail.com> wrote:
> > >
> > > From: Shyam Prasad N <sprasad@microsoft.com>
> > >
> > > In the output of /proc/fs/cifs/DebugData, we do not
> > > print the server->capabilities field today.
> > > With this change, we will do that.
> >
> > We already print session capabilities in DebugData. How is it
> > different from that.?
>
> These are capabilities at the server level. That one is at session level.
> Actually, there's tcon capabilities as well, which I think we should
> also dump in DebugData.
> I'll submit a revised version for that as well.

Actually, it looks like that's already done in smb2_dump_share_caps.
It would be even better to print server capabilities in the symbolic
form similar to how it's done there.
But this works too. I think we can do a follow up patch for that if needed.

>
> --
> Regards,
> Shyam
Steve French Oct. 30, 2023, 2:54 p.m. UTC | #4
Made a minor change "Server capability: "  --> "Server capabilities:"
to make it consistent with the places we print session and tcon
capabilities in the DebugData

Let me know if any objections

On Mon, Oct 30, 2023 at 6:00 AM <nspmangalore@gmail.com> wrote:
>
> From: Shyam Prasad N <sprasad@microsoft.com>
>
> In the output of /proc/fs/cifs/DebugData, we do not
> print the server->capabilities field today.
> With this change, we will do that.
>
> Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
> ---
>  fs/smb/client/cifs_debug.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
> index 76922fcc4bc6..a9dfecc397a8 100644
> --- a/fs/smb/client/cifs_debug.c
> +++ b/fs/smb/client/cifs_debug.c
> @@ -427,6 +427,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
>                 if (server->nosharesock)
>                         seq_printf(m, " nosharesock");
>
> +               seq_printf(m, "\nServer capability: 0x%x", server->capabilities);
> +
>                 if (server->rdma)
>                         seq_printf(m, "\nRDMA ");
>                 seq_printf(m, "\nTCP status: %d Instance: %d"
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
index 76922fcc4bc6..a9dfecc397a8 100644
--- a/fs/smb/client/cifs_debug.c
+++ b/fs/smb/client/cifs_debug.c
@@ -427,6 +427,8 @@  static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 		if (server->nosharesock)
 			seq_printf(m, " nosharesock");
 
+		seq_printf(m, "\nServer capability: 0x%x", server->capabilities);
+
 		if (server->rdma)
 			seq_printf(m, "\nRDMA ");
 		seq_printf(m, "\nTCP status: %d Instance: %d"