diff options
author | Andy Adamson <andros@netapp.com> | 2009-04-01 09:22:42 -0400 |
---|---|---|
committer | Benny Halevy <bhalevy@panasas.com> | 2009-06-17 15:25:08 -0400 |
commit | 4745e3154bf33048d970d1519703089493988f65 (patch) | |
tree | 474017eef52b407864fde5ed036db3270544d085 /fs/nfs | |
parent | eedc020e718b8ce45381383ec66030f09eb02a1e (diff) |
nfs41: kick start nfs41 session recovery when handling errors
Remove checking for any errors that the SEQUENCE operation does not return.
-NFS4ERR_STALE_CLIENTID, NFS4ERR_EXPIRED, NFS4ERR_CB_PATH_DOWN, NFS4ERR_BACK_CHAN_BUSY, NFS4ERR_OP_NOT_IN_SESSION.
SEQUENCE operation error recovery is very primative, we only reset the session.
Remove checking for any errors that are returned by the SEQUENCE operation, but
that resetting the session won't address.
NFS4ERR_RETRY_UNCACHED_REP, NFS4ERR_SEQUENCE_POS,NFS4ERR_TOO_MANY_OPS.
Add error checking for missing SEQUENCE errors that a session reset will
address.
NFS4ERR_BAD_HIGH_SLOT, NFS4ERR_DEADSESSION, NFS4ERR_SEQ_FALSE_RETRY.
A reset of the session is currently our only response to a SEQUENCE operation
error. Don't reset the session on errors where a new session won't help.
Don't reset the session on errors where a new session won't help.
[nfs41: nfs4_async_handle_error update error checking]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[nfs41: trigger the state manager for session reset]
Replace session state bit with nfs_client state bit. Set the
NFS4CLNT_SESSION_SETUP bit upon a session related error in the sync/async
error handlers.
[nfs41: _nfs4_async_handle_error fix session reset error list]
Sequence operation errors that session reset could help.
NFS4ERR_BADSESSION
NFS4ERR_BADSLOT
NFS4ERR_BAD_HIGH_SLOT
NFS4ERR_DEADSESSION
NFS4ERR_CONN_NOT_BOUND_TO_SESSION
NFS4ERR_SEQ_FALSE_RETRY
NFS4ERR_SEQ_MISORDERED
Sequence operation errors that a session reset would not help
NFS4ERR_BADXDR
NFS4ERR_DELAY
NFS4ERR_REP_TOO_BIG
NFS4ERR_REP_TOO_BIG_TO_CACHE
NFS4ERR_REQ_TOO_BIG
NFS4ERR_RETRY_UNCACHED_REP
NFS4ERR_SEQUENCE_POS
NFS4ERR_TOO_MANY_OPS
Signed-off-by: Andy Adamson <andros@netapp.com>
[nfs41 nfs4_handle_exception fix session reset error list]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[moved nfs41_sequece_call_done code to nfs41: sequence operation]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 2d45606a8085..ed6c8899806d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -249,7 +249,25 @@ static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, | |||
249 | ret = nfs4_wait_clnt_recover(clp); | 249 | ret = nfs4_wait_clnt_recover(clp); |
250 | if (ret == 0) | 250 | if (ret == 0) |
251 | exception->retry = 1; | 251 | exception->retry = 1; |
252 | #if !defined(CONFIG_NFS_V4_1) | ||
252 | break; | 253 | break; |
254 | #else /* !defined(CONFIG_NFS_V4_1) */ | ||
255 | if (!nfs4_has_session(server->nfs_client)) | ||
256 | break; | ||
257 | /* FALLTHROUGH */ | ||
258 | case -NFS4ERR_BADSESSION: | ||
259 | case -NFS4ERR_BADSLOT: | ||
260 | case -NFS4ERR_BAD_HIGH_SLOT: | ||
261 | case -NFS4ERR_CONN_NOT_BOUND_TO_SESSION: | ||
262 | case -NFS4ERR_DEADSESSION: | ||
263 | case -NFS4ERR_SEQ_FALSE_RETRY: | ||
264 | case -NFS4ERR_SEQ_MISORDERED: | ||
265 | dprintk("%s ERROR: %d Reset session\n", __func__, | ||
266 | errorcode); | ||
267 | set_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state); | ||
268 | exception->retry = 1; | ||
269 | /* FALLTHROUGH */ | ||
270 | #endif /* !defined(CONFIG_NFS_V4_1) */ | ||
253 | case -NFS4ERR_FILE_OPEN: | 271 | case -NFS4ERR_FILE_OPEN: |
254 | case -NFS4ERR_GRACE: | 272 | case -NFS4ERR_GRACE: |
255 | case -NFS4ERR_DELAY: | 273 | case -NFS4ERR_DELAY: |
@@ -3241,6 +3259,20 @@ _nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, | |||
3241 | rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); | 3259 | rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); |
3242 | task->tk_status = 0; | 3260 | task->tk_status = 0; |
3243 | return -EAGAIN; | 3261 | return -EAGAIN; |
3262 | #if defined(CONFIG_NFS_V4_1) | ||
3263 | case -NFS4ERR_BADSESSION: | ||
3264 | case -NFS4ERR_BADSLOT: | ||
3265 | case -NFS4ERR_BAD_HIGH_SLOT: | ||
3266 | case -NFS4ERR_DEADSESSION: | ||
3267 | case -NFS4ERR_CONN_NOT_BOUND_TO_SESSION: | ||
3268 | case -NFS4ERR_SEQ_FALSE_RETRY: | ||
3269 | case -NFS4ERR_SEQ_MISORDERED: | ||
3270 | dprintk("%s ERROR %d, Reset session\n", __func__, | ||
3271 | task->tk_status); | ||
3272 | set_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state); | ||
3273 | task->tk_status = 0; | ||
3274 | return -EAGAIN; | ||
3275 | #endif /* CONFIG_NFS_V4_1 */ | ||
3244 | case -NFS4ERR_DELAY: | 3276 | case -NFS4ERR_DELAY: |
3245 | if (server) | 3277 | if (server) |
3246 | nfs_inc_server_stats(server, NFSIOS_DELAY); | 3278 | nfs_inc_server_stats(server, NFSIOS_DELAY); |