Skip to content

Commit

Permalink
NFSv4.1 skip rpc_call_done only on disconnected DS slot_table_waitq t…
Browse files Browse the repository at this point in the history
…asks

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>
  • Loading branch information
Andy Adamson authored and Trond Myklebust committed May 22, 2012
1 parent 996074c commit bd4aeff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/nfs/nfs4filelayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ static void filelayout_read_call_done(struct rpc_task *task, void *data)

dprintk("--> %s task->tk_status %d\n", __func__, task->tk_status);

if (test_bit(NFS_IOHDR_REDO, &rdata->header->flags))
if (test_bit(NFS_IOHDR_REDO, &rdata->header->flags) &&
task->tk_status == 0)
return;

/* Note this may cause RPC to be resent */
Expand Down Expand Up @@ -399,7 +400,8 @@ static void filelayout_write_call_done(struct rpc_task *task, void *data)
{
struct nfs_write_data *wdata = data;

if (test_bit(NFS_IOHDR_REDO, &wdata->header->flags))
if (test_bit(NFS_IOHDR_REDO, &wdata->header->flags) &&
task->tk_status == 0)
return;

/* Note this may cause RPC to be resent */
Expand Down

0 comments on commit bd4aeff

Please sign in to comment.