From: andros@netapp.com
To: trond.myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, Andy Adamson <andros@netapp.com>
Subject: [PATCH 2/4] NFSv4.1 skip rpc_call_done only on disconnected DS slot_table_waitq tasks
Date: Tue, 22 May 2012 08:09:27 -0400 [thread overview]
Message-ID: <1337688569-1515-3-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1337688569-1515-1-git-send-email-andros@netapp.com>
From: Andy Adamson <andros@netapp.com>
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>
---
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 8df91be..db6f2a6 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)
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 */
@@ -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 */
--
1.7.7.6
next prev parent reply other threads:[~2012-05-22 16:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 12:09 [PATCH 1/4] NFSv4.1 just use nfs_put_client in filelayout release andros
2012-05-22 12:09 ` [PATCH 1/4] NFSv4.1 Just " andros
2012-05-22 16:12 ` Andy Adamson
2012-05-22 12:09 ` andros [this message]
2012-05-22 12:09 ` [PATCH 3/4] NFSv4.1 fix null state reference in filelayout_async_handle_error andros
2012-05-22 12:09 ` [PATCH 4/4] NFSv4.1 do not release page on commit mismatch andros
2012-05-22 16:24 ` Myklebust, Trond
2012-05-22 16:30 ` Adamson, Andy
2012-05-22 17:46 ` Myklebust, Trond
2012-05-22 18:07 ` Andy Adamson
2012-05-22 20:40 ` Myklebust, Trond
2012-05-23 13:35 ` Adamson, Andy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337688569-1515-3-git-send-email-andros@netapp.com \
--to=andros@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@netapp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).