summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2017-02-08 11:17:55 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-02-09 14:15:16 -0500
commit26ae102f2cfd0215daa57dc790aa3bfe534403a9 (patch)
treece13f4d3a76929211161d40eb5d180252a99096a /fs
parent7196dbb02ea05835b9ee56910ee82cb55422c7f1 (diff)
downloadop-kernel-dev-26ae102f2cfd0215daa57dc790aa3bfe534403a9.zip
op-kernel-dev-26ae102f2cfd0215daa57dc790aa3bfe534403a9.tar.gz
NFSv4: Set the connection timeout to match the lease period
Set the timeout for TCP connections to be 1 lease period to ensure that we don't lose our lease due to a faulty TCP connection. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4renewd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c
index 82e7719..1f8c2ae 100644
--- a/fs/nfs/nfs4renewd.c
+++ b/fs/nfs/nfs4renewd.c
@@ -153,7 +153,7 @@ void nfs4_set_lease_period(struct nfs_client *clp,
spin_unlock(&clp->cl_lock);
/* Cap maximum reconnect timeout at 1/2 lease period */
- rpc_cap_max_reconnect_timeout(clp->cl_rpcclient, lease >> 1);
+ rpc_set_connect_timeout(clp->cl_rpcclient, lease, lease >> 1);
}
/*
OpenPOWER on IntegriCloud