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 21:49:58 +0000	[thread overview]
Message-ID: <1384897797.45997.1.camel@leira.trondhjem.org> (raw)
In-Reply-To: <1384551376-8734-1-git-send-email-andros@netapp.com>

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

On Fri, 2013-11-15 at 16:36 -0500, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> When the state manager is processing the NFS4CLNT_DELEGRETURN flag, session
> draining is off, but DELEGRETURN can still get a session error.
> The async handler calls nfs4_schedule_session_recovery returns -EAGAIN, and
> the DELEGRETURN done then restarts the RPC task in the prepare state.
> With the state manager still processing the NFS4CLNT_DELEGRETURN flag with
> session draining off, these DELEGRETURNs will cycle with errors filling up the
> session slots.
> 
> This prevents OPEN reclaims (from nfs_delegation_claim_opens) required by the
> NFS4CLNT_DELEGRETURN state manager processing from completing, hanging the
> state manager in the __rpc_wait_for_completion_task in nfs4_run_open_task
> as seen in this kernel thread dump:
> 

Hi Andy,

There is a second patch that goes with this problem. Please see the
following attachment.

Cheers
  Trond
-- 
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: 1398 bytes --]

From 20a4067243f81c1417bf62ecea7697b79901926f 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] 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.

Also, 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 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 1f4edfbb4a70..aa16a22ad349 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4988,10 +4988,14 @@ 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);
+	case -NFS4ERR_ADMIN_REVOKED:
+	case -NFS4ERR_DELEG_REVOKED:
+	case -NFS4ERR_BAD_STATEID:
+	case -NFS4ERR_OLD_STATEID:
+	case -NFS4ERR_STALE_STATEID:
+	case -NFS4ERR_EXPIRED:
 		break;
 	default:
 		if (nfs4_async_handle_error(task, data->res.server, NULL) ==
-- 
1.8.3.1


  reply	other threads:[~2013-11-19 21:50 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 [this message]
2013-11-19 22:34   ` Myklebust, Trond
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=1384897797.45997.1.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).