Re: [PATCH 3/6] cifs: add a warning when the in-flight count goes negative

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

 



should this be a warn once? Could it get very noisy?

On Fri, Jun 9, 2023 at 12:47 PM Shyam Prasad N <nspmangalore@xxxxxxxxx> wrote:
>
> We've seen the in-flight count go into negative with some
> internal stress testing in Microsoft.
>
> Adding a WARN when this happens, in hope of understanding
> why this happens when it happens.
>
> Signed-off-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
> ---
>  fs/smb/client/smb2ops.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
> index 6e3be58cfe49..43162915e03c 100644
> --- a/fs/smb/client/smb2ops.c
> +++ b/fs/smb/client/smb2ops.c
> @@ -91,6 +91,7 @@ smb2_add_credits(struct TCP_Server_Info *server,
>                                             server->conn_id, server->hostname, *val,
>                                             add, server->in_flight);
>         }
> +       WARN_ON(server->in_flight == 0);
>         server->in_flight--;
>         if (server->in_flight == 0 &&
>            ((optype & CIFS_OP_MASK) != CIFS_NEG_OP) &&
> --
> 2.34.1
>


-- 
Thanks,

Steve




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

  Powered by Linux