From: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
To: trond.myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Subject: [PATCH 3/5] nfs41: Retry delegation return if it failed with session error
Date: Mon, 7 Dec 2009 00:21:49 -0800 [thread overview]
Message-ID: <1260174111-23160-4-git-send-email-Ricardo.Labiaga@netapp.com> (raw)
In-Reply-To: <1260174111-23160-3-git-send-email-Ricardo.Labiaga@netapp.com>
Update nfs4_delegreturn_done() to retry the operation after setting the
NFS4CLNT_SESSION_SETUP bit to indicate the need to reset the session.
Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
---
fs/nfs/nfs4proc.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 6a8861c..53b0a7d 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3490,9 +3490,20 @@ static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata)
nfs4_sequence_done(data->res.server, &data->res.seq_res,
task->tk_status);
- data->rpc_status = task->tk_status;
- if (data->rpc_status == 0)
+ switch (task->tk_status) {
+ case -NFS4ERR_STALE_STATEID:
+ case -NFS4ERR_EXPIRED:
+ case 0:
renew_lease(data->res.server, data->timestamp);
+ break;
+ default:
+ if (nfs4_async_handle_error(task, data->res.server, NULL) ==
+ -EAGAIN) {
+ nfs4_restart_rpc(task, data->res.server->nfs_client);
+ return;
+ }
+ }
+ data->rpc_status = task->tk_status;
}
static void nfs4_delegreturn_release(void *calldata)
--
1.5.4.3
next prev parent reply other threads:[~2009-12-07 8:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 8:21 [PATCH 0/5] Reclaim Stage Bug Fixes Version 2 Ricardo Labiaga
2009-12-07 8:21 ` [PATCH 1/5] nfs41: Mark stateids in need of reclaim if state manager gets stale clientid Ricardo Labiaga
2009-12-07 8:21 ` [PATCH 2/5] nfs41: Handle session errors during delegation return Ricardo Labiaga
2009-12-07 8:21 ` Ricardo Labiaga [this message]
2009-12-07 8:21 ` [PATCH 4/5] nfs41: New NFS4CLNT_RECLAIM_COMPLETE_PENDING state Ricardo Labiaga
2009-12-07 8:21 ` [PATCH 5/5] nfs41: Handle NFSv4.1 session errors in the delegation recall code Ricardo Labiaga
2009-12-07 14:47 ` [PATCH 4/5] nfs41: New NFS4CLNT_RECLAIM_COMPLETE_PENDING state Trond Myklebust
2009-12-07 17:51 ` Labiaga, Ricardo
2009-12-07 18:11 ` Trond Myklebust
2009-12-07 21:41 ` Labiaga, Ricardo
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=1260174111-23160-4-git-send-email-Ricardo.Labiaga@netapp.com \
--to=ricardo.labiaga@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.