diff options
author | Trond Myklebust | 2016-08-05 19:03:31 -0400 |
---|---|---|
committer | Trond Myklebust | 2016-08-05 19:22:22 -0400 |
commit | 8d480326c3d6921ff5f1cc988c993bd572248deb (patch) | |
tree | eb2eac08a44bc78241d78291de545f37f6f3fd51 /fs/nfs | |
parent | fb10fb67ad2ce43d5e5b8ad22d2ba826844acc56 (diff) |
NFSv4: Cap the transport reconnection timer at 1/2 lease period
We don't want to miss a lease period renewal due to the TCP connection
failing to reconnect in a timely fashion. To ensure this doesn't happen,
cap the reconnection timer so that we retry the connection attempt
at least every 1/2 lease period.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4renewd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c index 062029ab344a..82e77198d17e 100644 --- a/fs/nfs/nfs4renewd.c +++ b/fs/nfs/nfs4renewd.c @@ -151,6 +151,9 @@ void nfs4_set_lease_period(struct nfs_client *clp, clp->cl_lease_time = lease; clp->cl_last_renewal = lastrenewed; spin_unlock(&clp->cl_lock); + + /* Cap maximum reconnect timeout at 1/2 lease period */ + rpc_cap_max_reconnect_timeout(clp->cl_rpcclient, lease >> 1); } /* |