diff options
author | Andy Adamson <andros@netapp.com> | 2009-12-04 15:55:05 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-12-04 15:55:05 -0500 |
commit | 6df08189ffd33d8357759561dba49d25c0335858 (patch) | |
tree | 8f1d38370002cb05534628ee7b6bbfd04242b715 /fs/nfs | |
parent | 4d643d1dfa9349164fe928e255f68020d91dbfe0 (diff) |
nfs41: rename cl_state session SETUP bit to RESET
The bit is no longer used for session setup, only for session reset.
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/internal.h | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4_fs.h | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 8 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index e21b1bb9972f..ebcd3795389e 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h | |||
@@ -183,7 +183,7 @@ static inline void nfs4_restart_rpc(struct rpc_task *task, | |||
183 | { | 183 | { |
184 | #ifdef CONFIG_NFS_V4_1 | 184 | #ifdef CONFIG_NFS_V4_1 |
185 | if (nfs4_has_session(clp) && | 185 | if (nfs4_has_session(clp) && |
186 | test_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state)) { | 186 | test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) { |
187 | rpc_restart_call_prepare(task); | 187 | rpc_restart_call_prepare(task); |
188 | return; | 188 | return; |
189 | } | 189 | } |
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 99d507d22f23..e9ecd6bf9257 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -44,7 +44,7 @@ enum nfs4_client_state { | |||
44 | NFS4CLNT_RECLAIM_REBOOT, | 44 | NFS4CLNT_RECLAIM_REBOOT, |
45 | NFS4CLNT_RECLAIM_NOGRACE, | 45 | NFS4CLNT_RECLAIM_NOGRACE, |
46 | NFS4CLNT_DELEGRETURN, | 46 | NFS4CLNT_DELEGRETURN, |
47 | NFS4CLNT_SESSION_SETUP, | 47 | NFS4CLNT_SESSION_RESET, |
48 | }; | 48 | }; |
49 | 49 | ||
50 | /* | 50 | /* |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 528b60a23ed5..ff1c7344e086 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -270,7 +270,7 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, | |||
270 | case -NFS4ERR_SEQ_MISORDERED: | 270 | case -NFS4ERR_SEQ_MISORDERED: |
271 | dprintk("%s ERROR: %d Reset session\n", __func__, | 271 | dprintk("%s ERROR: %d Reset session\n", __func__, |
272 | errorcode); | 272 | errorcode); |
273 | set_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state); | 273 | set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); |
274 | exception->retry = 1; | 274 | exception->retry = 1; |
275 | /* FALLTHROUGH */ | 275 | /* FALLTHROUGH */ |
276 | #endif /* !defined(CONFIG_NFS_V4_1) */ | 276 | #endif /* !defined(CONFIG_NFS_V4_1) */ |
@@ -446,7 +446,7 @@ static int nfs4_recover_session(struct nfs4_session *session) | |||
446 | ret = nfs4_wait_clnt_recover(clp); | 446 | ret = nfs4_wait_clnt_recover(clp); |
447 | if (ret != 0) | 447 | if (ret != 0) |
448 | break; | 448 | break; |
449 | if (!test_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state)) | 449 | if (!test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) |
450 | break; | 450 | break; |
451 | nfs4_schedule_state_manager(clp); | 451 | nfs4_schedule_state_manager(clp); |
452 | ret = -EIO; | 452 | ret = -EIO; |
@@ -475,7 +475,7 @@ static int nfs41_setup_sequence(struct nfs4_session *session, | |||
475 | tbl = &session->fc_slot_table; | 475 | tbl = &session->fc_slot_table; |
476 | 476 | ||
477 | spin_lock(&tbl->slot_tbl_lock); | 477 | spin_lock(&tbl->slot_tbl_lock); |
478 | if (test_bit(NFS4CLNT_SESSION_SETUP, &session->clp->cl_state)) { | 478 | if (test_bit(NFS4CLNT_SESSION_RESET, &session->clp->cl_state)) { |
479 | if (tbl->highest_used_slotid != -1) { | 479 | if (tbl->highest_used_slotid != -1) { |
480 | rpc_sleep_on(&tbl->slot_tbl_waitq, task, NULL); | 480 | rpc_sleep_on(&tbl->slot_tbl_waitq, task, NULL); |
481 | spin_unlock(&tbl->slot_tbl_lock); | 481 | spin_unlock(&tbl->slot_tbl_lock); |
@@ -3363,7 +3363,7 @@ _nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, | |||
3363 | case -NFS4ERR_SEQ_MISORDERED: | 3363 | case -NFS4ERR_SEQ_MISORDERED: |
3364 | dprintk("%s ERROR %d, Reset session\n", __func__, | 3364 | dprintk("%s ERROR %d, Reset session\n", __func__, |
3365 | task->tk_status); | 3365 | task->tk_status); |
3366 | set_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state); | 3366 | set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); |
3367 | task->tk_status = 0; | 3367 | task->tk_status = 0; |
3368 | return -EAGAIN; | 3368 | return -EAGAIN; |
3369 | #endif /* CONFIG_NFS_V4_1 */ | 3369 | #endif /* CONFIG_NFS_V4_1 */ |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 967fc76a2463..902d8749bde4 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -1092,7 +1092,7 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error) | |||
1092 | case -NFS4ERR_CONN_NOT_BOUND_TO_SESSION: | 1092 | case -NFS4ERR_CONN_NOT_BOUND_TO_SESSION: |
1093 | case -NFS4ERR_SEQ_FALSE_RETRY: | 1093 | case -NFS4ERR_SEQ_FALSE_RETRY: |
1094 | case -NFS4ERR_SEQ_MISORDERED: | 1094 | case -NFS4ERR_SEQ_MISORDERED: |
1095 | set_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state); | 1095 | set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); |
1096 | } | 1096 | } |
1097 | return error; | 1097 | return error; |
1098 | } | 1098 | } |
@@ -1256,7 +1256,7 @@ static void nfs4_state_manager(struct nfs_client *clp) | |||
1256 | } | 1256 | } |
1257 | 1257 | ||
1258 | /* Initialize or reset the session */ | 1258 | /* Initialize or reset the session */ |
1259 | if (test_and_clear_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state) | 1259 | if (test_and_clear_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state) |
1260 | && nfs4_has_session(clp)) { | 1260 | && nfs4_has_session(clp)) { |
1261 | status = nfs4_reset_session(clp); | 1261 | status = nfs4_reset_session(clp); |
1262 | if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state)) | 1262 | if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state)) |
@@ -1270,7 +1270,7 @@ static void nfs4_state_manager(struct nfs_client *clp) | |||
1270 | status = nfs4_do_reclaim(clp, | 1270 | status = nfs4_do_reclaim(clp, |
1271 | nfs4_reboot_recovery_ops[clp->cl_minorversion]); | 1271 | nfs4_reboot_recovery_ops[clp->cl_minorversion]); |
1272 | if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) || | 1272 | if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) || |
1273 | test_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state)) | 1273 | test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) |
1274 | continue; | 1274 | continue; |
1275 | nfs4_state_end_reclaim_reboot(clp); | 1275 | nfs4_state_end_reclaim_reboot(clp); |
1276 | if (test_bit(NFS4CLNT_RECLAIM_NOGRACE, &clp->cl_state)) | 1276 | if (test_bit(NFS4CLNT_RECLAIM_NOGRACE, &clp->cl_state)) |
@@ -1284,7 +1284,7 @@ static void nfs4_state_manager(struct nfs_client *clp) | |||
1284 | status = nfs4_do_reclaim(clp, | 1284 | status = nfs4_do_reclaim(clp, |
1285 | nfs4_nograce_recovery_ops[clp->cl_minorversion]); | 1285 | nfs4_nograce_recovery_ops[clp->cl_minorversion]); |
1286 | if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) || | 1286 | if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) || |
1287 | test_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state) || | 1287 | test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state) || |
1288 | test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) | 1288 | test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) |
1289 | continue; | 1289 | continue; |
1290 | if (status < 0) | 1290 | if (status < 0) |