summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsctl.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2018-06-08 18:28:47 +0200
committerJ. Bruce Fields <bfields@redhat.com>2018-06-17 16:20:47 +0200
commit03f318ca652889a1aa407e7088b9a2f6a14ae374 (patch)
tree9c60c888c2fa0b4e2bdf1dae64754680e0b7faad /fs/nfsd/nfsctl.c
parentLinux 4.18-rc1 (diff)
downloadlinux-03f318ca652889a1aa407e7088b9a2f6a14ae374.tar.xz
linux-03f318ca652889a1aa407e7088b9a2f6a14ae374.zip
nfsd4: extend reclaim period for reclaiming clients
If the client is only renewing state a little sooner than once a lease period, then it might not discover the server has restarted till close to the end of the grace period, and might run out of time to do the actual reclaim. Extend the grace period by a second each time we notice there are clients still trying to reclaim, up to a limit of another whole lease period. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfsctl.c')
-rw-r--r--fs/nfsd/nfsctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index d107b4426f7e..5f22476cf371 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1239,6 +1239,7 @@ static __net_init int nfsd_init_net(struct net *net)
goto out_idmap_error;
nn->nfsd4_lease = 90; /* default lease time */
nn->nfsd4_grace = 90;
+ nn->somebody_reclaimed = false;
nn->clverifier_counter = prandom_u32();
nn->clientid_counter = prandom_u32();