Re: [PATCH 2/6] cifs: print all credit counters in DebugData

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tentatively merged into cifs-2.6.git for-next pending additional testing

On Fri, Jun 9, 2023 at 12:47 PM Shyam Prasad N <nspmangalore@xxxxxxxxx> wrote:
>
> Output of /proc/fs/cifs/DebugData shows only the per-connection
> counter for the number of credits of regular type. i.e. the
> credits reserved for echo and oplocks are not displayed.
>
> There have been situations recently where having this info
> would have been useful. This change prints the credit counters
> of all three types: regular, echo, oplocks.
>
> Signed-off-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
> ---
>  fs/smb/client/cifs_debug.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
> index 5034b862cec2..17c884724590 100644
> --- a/fs/smb/client/cifs_debug.c
> +++ b/fs/smb/client/cifs_debug.c
> @@ -130,12 +130,14 @@ cifs_dump_channel(struct seq_file *m, int i, struct cifs_chan *chan)
>         struct TCP_Server_Info *server = chan->server;
>
>         seq_printf(m, "\n\n\t\tChannel: %d ConnectionId: 0x%llx"
> -                  "\n\t\tNumber of credits: %d Dialect 0x%x"
> +                  "\n\t\tNumber of credits: %d,%d,%d Dialect 0x%x"
>                    "\n\t\tTCP status: %d Instance: %d"
>                    "\n\t\tLocal Users To Server: %d SecMode: 0x%x Req On Wire: %d"
>                    "\n\t\tIn Send: %d In MaxReq Wait: %d",
>                    i+1, server->conn_id,
>                    server->credits,
> +                  server->echo_credits,
> +                  server->oplock_credits,
>                    server->dialect,
>                    server->tcpStatus,
>                    server->reconnect_instance,
> @@ -350,8 +352,11 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
>                         atomic_read(&server->smbd_conn->mr_used_count));
>  skip_rdma:
>  #endif
> -               seq_printf(m, "\nNumber of credits: %d Dialect 0x%x",
> -                       server->credits,  server->dialect);
> +               seq_printf(m, "\nNumber of credits: %d,%d,%d Dialect 0x%x",
> +                       server->credits,
> +                       server->echo_credits,
> +                       server->oplock_credits,
> +                       server->dialect);
>                 if (server->compress_algorithm == SMB3_COMPRESS_LZNT1)
>                         seq_printf(m, " COMPRESS_LZNT1");
>                 else if (server->compress_algorithm == SMB3_COMPRESS_LZ77)
> --
> 2.34.1
>


-- 
Thanks,

Steve




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux