lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8db50c039cb8b8325bb428c60ff005b899654fb4.camel@hammerspace.com>
Date:   Mon, 2 Nov 2020 17:45:48 +0000
From:   Trond Myklebust <trondmy@...merspace.com>
To:     "anna.schumaker@...app.com" <anna.schumaker@...app.com>,
        "solomonchenclever@...il.com" <solomonchenclever@...il.com>
CC:     "chenwenle@...wei.com" <chenwenle@...wei.com>,
        "linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
        "solachenclever@...mail.com" <solachenclever@...mail.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "nixiaoming@...wei.com" <nixiaoming@...wei.com>,
        "solachenclever@...il.com" <solachenclever@...il.com>
Subject: Re: [PATCH 2/2] NFS: Limit the number of retries

On Tue, 2020-11-03 at 00:24 +0800, Wenle Chen wrote:
>   We can't wait forever, even if the state
> is always delayed.
> 
> Signed-off-by: Wenle Chen <chenwenle@...wei.com>
> ---
>  fs/nfs/nfs4proc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index f6b5dc792b33..bb2316bf13f6 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -7390,15 +7390,17 @@ int nfs4_lock_delegation_recall(struct
> file_lock *fl, struct nfs4_state *state,
>  {
>         struct nfs_server *server = NFS_SERVER(state->inode);
>         int err;
> +       int retry = 3;
>  
>         err = nfs4_set_lock_state(state, fl);
>         if (err != 0)
>                 return err;
>         do {
>                 err = _nfs4_do_setlk(state, F_SETLK, fl,
> NFS_LOCK_NEW);
> -               if (err != -NFS4ERR_DELAY)
> +               if (err != -NFS4ERR_DELAY || retry == 0)
>                         break;
>                 ssleep(1);
> +               --retry;
>         } while (1);
>         return nfs4_handle_delegation_recall_error(server, state,
> stateid, fl, err);
>  }

This patch will just cause the locks to be silently lost, no?

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@...merspace.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ