From: <wang.yi59@zte.com.cn>
To: <trond.myklebust@hammerspace.com>, <anna@kernel.org>,
<linux-nfs@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <xue.zhihong@zte.com.cn>,
<wang.liang82@zte.com.cn>, <zhang.xianwei8@zte.com.cn>,
<wang.yi59@zte.com.cn>
Subject: Re:[PATCH] NFSv4.1: RECLAIM_COMPLETE must handle EACCES
Date: Tue, 9 Aug 2022 11:10:16 +0800 (CST) [thread overview]
Message-ID: <202208091110164796108@zte.com.cn> (raw)
In-Reply-To: <20220727100107.3062-1-wang.yi59@zte.com.cn>
Gentle ping :)
> From: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
>
> A client should be able to handle getting an EACCES error while doing
> a mount operation to reclaim state due to NFS4CLNT_RECLAIM_REBOOT
> being set. If the server returns RPC_AUTH_BADCRED because authentication
> failed when we execute "exportfs -au", then RECLAIM_COMPLETE will go a
> wrong way. After mount succeeds, all OPEN call will fail due to an
> NFS4ERR_GRACE error being returned. This patch is to fix it by resending
> a RPC request.
>
> Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> ---
> fs/nfs/nfs4proc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index bb0e84a46d61..b51b83506011 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -9477,6 +9477,9 @@ static int nfs41_reclaim_complete_handle_errors(struct rpc_task *task, struct nf
> rpc_delay(task, NFS4_POLL_RETRY_MAX);
> fallthrough;
> case -NFS4ERR_RETRY_UNCACHED_REP:
> + case -EACCES:
> + dprintk("%s: failed to reclaim complete error %d for server %s, retrying\n",
> + __func__, task->tk_status, clp->cl_hostname);
> return -EAGAIN;
> case -NFS4ERR_BADSESSION:
> case -NFS4ERR_DEADSESSION:
prev parent reply other threads:[~2022-08-09 3:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 10:01 [PATCH] NFSv4.1: RECLAIM_COMPLETE must handle EACCES Yi Wang
2022-08-09 3:10 ` wang.yi59 [this message]
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=202208091110164796108@zte.com.cn \
--to=wang.yi59@zte.com.cn \
--cc=anna@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
--cc=wang.liang82@zte.com.cn \
--cc=xue.zhihong@zte.com.cn \
--cc=zhang.xianwei8@zte.com.cn \
/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