diff options
author | Andy Adamson <andros@netapp.com> | 2012-05-22 08:09:27 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-22 16:42:42 -0400 |
commit | bd4aeffb5b89070ae93c579f1d5a0758f7123e8b (patch) | |
tree | 053682177f4d0211aabcd498c8be6aee768ed195 /fs/nfs/nfs4filelayout.c | |
parent | 996074cb8c355bf3d87d066ba1e1189ba3f648f5 (diff) |
NFSv4.1 skip rpc_call_done only on disconnected DS slot_table_waitq tasks
We reset all I/O on a disconnected data server through the pgio layer indicated
by the NFS_IOHDR_REDO flag.
Differentiate between on-the-wire tasks returning with an error which must
call rpc_call_done and tasks woken from the data server slot_table_waitq
waiting for a session slot with a status of zero which call rpc_exit in
rpc_prepare and need to skip rpc_call_done.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r-- | fs/nfs/nfs4filelayout.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index 466284793119..56aa0ec1b169 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c | |||
@@ -302,7 +302,8 @@ static void filelayout_read_call_done(struct rpc_task *task, void *data) | |||
302 | 302 | ||
303 | dprintk("--> %s task->tk_status %d\n", __func__, task->tk_status); | 303 | dprintk("--> %s task->tk_status %d\n", __func__, task->tk_status); |
304 | 304 | ||
305 | if (test_bit(NFS_IOHDR_REDO, &rdata->header->flags)) | 305 | if (test_bit(NFS_IOHDR_REDO, &rdata->header->flags) && |
306 | task->tk_status == 0) | ||
306 | return; | 307 | return; |
307 | 308 | ||
308 | /* Note this may cause RPC to be resent */ | 309 | /* Note this may cause RPC to be resent */ |
@@ -399,7 +400,8 @@ static void filelayout_write_call_done(struct rpc_task *task, void *data) | |||
399 | { | 400 | { |
400 | struct nfs_write_data *wdata = data; | 401 | struct nfs_write_data *wdata = data; |
401 | 402 | ||
402 | if (test_bit(NFS_IOHDR_REDO, &wdata->header->flags)) | 403 | if (test_bit(NFS_IOHDR_REDO, &wdata->header->flags) && |
404 | task->tk_status == 0) | ||
403 | return; | 405 | return; |
404 | 406 | ||
405 | /* Note this may cause RPC to be resent */ | 407 | /* Note this may cause RPC to be resent */ |