aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-02-28 20:34:11 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-11 15:38:41 -0500
commitd6fb79d433d0a34c36bdf74eaf90857193a6261f (patch)
treebf7686b2bd65d598ef1a4e5ceaebb0432302a726 /fs/nfs
parentd3b4c9d76738df49a7db7682c2518a0ef9f7391d (diff)
NFSv4.1: new flag for lease time check
Data servers cannot send nfs4_proc_get_lease_time. but still need to setup state renewal. Add the NFS_CS_CHECK_LEASE_TIME bit to indicate if the lease time can be checked. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/client.c9
-rw-r--r--fs/nfs/nfs4state.c5
2 files changed, 14 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index a86698cd82fd..280d41f64a57 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1400,6 +1400,15 @@ static int nfs4_set_client(struct nfs_server *server,
1400 goto error; 1400 goto error;
1401 } 1401 }
1402 1402
1403 /*
1404 * Query for the lease time on clientid setup or renewal
1405 *
1406 * Note that this will be set on nfs_clients that were created
1407 * only for the DS role and did not set this bit, but now will
1408 * serve a dual role.
1409 */
1410 set_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state);
1411
1403 server->nfs_client = clp; 1412 server->nfs_client = clp;
1404 dprintk("<-- nfs4_set_client() = 0 [new %p]\n", clp); 1413 dprintk("<-- nfs4_set_client() = 0 [new %p]\n", clp);
1405 return 0; 1414 return 0;
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 0592288f9f06..69c836373124 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -153,6 +153,11 @@ static int nfs41_setup_state_renewal(struct nfs_client *clp)
153 int status; 153 int status;
154 struct nfs_fsinfo fsinfo; 154 struct nfs_fsinfo fsinfo;
155 155
156 if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state)) {
157 nfs4_schedule_state_renewal(clp);
158 return 0;
159 }
160
156 status = nfs4_proc_get_lease_time(clp, &fsinfo); 161 status = nfs4_proc_get_lease_time(clp, &fsinfo);
157 if (status == 0) { 162 if (status == 0) {
158 /* Update lease time and schedule renewal */ 163 /* Update lease time and schedule renewal */