linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
To: "Adamson, Andy" <William.Adamson@netapp.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH Version 3 1/1] NFSv4 wait on recovery for async session errors
Date: Tue, 19 Nov 2013 22:34:29 +0000	[thread overview]
Message-ID: <1384900469.45997.2.camel@leira.trondhjem.org> (raw)
In-Reply-To: <1384897797.45997.1.camel@leira.trondhjem.org>

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

On Tue, 2013-11-19 at 16:49 -0500, Trond Myklebust wrote:
> There is a second patch that goes with this problem. Please see the
> following attachment.

V2: Don't return an error when we know that the stateid is no longer
valid.

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-NFSv4-Update-list-of-irrecoverable-errors-on-DELEGRE.patch --]
[-- Type: text/x-patch; name="0001-NFSv4-Update-list-of-irrecoverable-errors-on-DELEGRE.patch", Size: 1505 bytes --]

From ba64b3649ce323004cc2bd75e5c9f785e6386779 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 19 Nov 2013 16:34:14 -0500
Subject: [PATCH v2] NFSv4: Update list of irrecoverable errors on DELEGRETURN

If the DELEGRETURN errors out with something like NFS4ERR_BAD_STATEID
then there is no recovery possible. Just quit without returning an error.

Also, note that the client must not assume that the NFSv4 lease has been
renewed when it sees an error on DELEGRETURN.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
---
 fs/nfs/nfs4proc.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 1f4edfbb4a70..ca36d0d50b7d 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4988,11 +4988,17 @@ static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata)
 
 	trace_nfs4_delegreturn_exit(&data->args, &data->res, task->tk_status);
 	switch (task->tk_status) {
-	case -NFS4ERR_STALE_STATEID:
-	case -NFS4ERR_EXPIRED:
 	case 0:
 		renew_lease(data->res.server, data->timestamp);
 		break;
+	case -NFS4ERR_ADMIN_REVOKED:
+	case -NFS4ERR_DELEG_REVOKED:
+	case -NFS4ERR_BAD_STATEID:
+	case -NFS4ERR_OLD_STATEID:
+	case -NFS4ERR_STALE_STATEID:
+	case -NFS4ERR_EXPIRED:
+		task->tk_status = 0;
+		break;
 	default:
 		if (nfs4_async_handle_error(task, data->res.server, NULL) ==
 				-EAGAIN) {
-- 
1.8.3.1


  reply	other threads:[~2013-11-19 22:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-15 21:36 [PATCH Version 3 1/1] NFSv4 wait on recovery for async session errors andros
2013-11-19 21:49 ` Myklebust, Trond
2013-11-19 22:34   ` Myklebust, Trond [this message]
2013-11-19 22:43     ` Adamson, Andy
2013-11-19 22:47       ` Myklebust, Trond
2013-11-20  9:29   ` William Dauchy
2013-11-21 23:48     ` William Dauchy

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=1384900469.45997.2.camel@leira.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=William.Adamson@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /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).