Skip to content

Commit e35a5e7

Browse files
zhangxianwei8Trond Myklebust
authored andcommitted
NFSv4.1: RECLAIM_COMPLETE must handle EACCES
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> Fixes: aa5190d ("NFSv4: Kill nfs4_async_handle_error() abuses by NFSv4.1") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent f201bdf commit e35a5e7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/nfs/nfs4proc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9487,6 +9487,9 @@ static int nfs41_reclaim_complete_handle_errors(struct rpc_task *task, struct nf
94879487
rpc_delay(task, NFS4_POLL_RETRY_MAX);
94889488
fallthrough;
94899489
case -NFS4ERR_RETRY_UNCACHED_REP:
9490+
case -EACCES:
9491+
dprintk("%s: failed to reclaim complete error %d for server %s, retrying\n",
9492+
__func__, task->tk_status, clp->cl_hostname);
94909493
return -EAGAIN;
94919494
case -NFS4ERR_BADSESSION:
94929495
case -NFS4ERR_DEADSESSION:

0 commit comments

Comments
 (0)