Patch "NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nfsv4.1-reclaim_complete-must-handle-nfs4err_conn_not_bound_to_session.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Apr 9 17:09:24 CEST 2018
From: Trond Myklebust <[email protected]>
Date: Thu, 4 May 2017 13:44:04 -0400
Subject: NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION
From: Trond Myklebust <[email protected]>
[ Upstream commit 0048fdd06614a4ea088f9fcad11511956b795698 ]
If the server returns NFS4ERR_CONN_NOT_BOUND_TO_SESSION because we are trunking, then RECLAIM_COMPLETE must handle that by calling nfs4_schedule_session_recovery() and then retrying.
--- fs/nfs/nfs4proc.c | 7 ++++++- fs/nfs/nfs4state.c | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-)
fs/nfs/nfs4proc.c +6 -1
@@ -8173,6 +8173,12 @@ static int nfs41_reclaim_complete_handle/* fall through */ case -NFS4ERR_RETRY_UNCACHED_REP :return -EAGAIN ; +case -NFS4ERR_BADSESSION : +case -NFS4ERR_DEADSESSION : +case -NFS4ERR_CONN_NOT_BOUND_TO_SESSION : +nfs4_schedule_session_recovery (clp->cl_session, + task->tk_status); +break ;default :nfs4_schedule_lease_recovery (clp); }
@@ -8251,7 +8257,6 @@ static int nfs41_proc_reclaim_complete(sif (status ==0 ) status = task->tk_status;rpc_put_task (task); -return 0 ; out:dprintk ("<-- %s status=%d\n" , __func__, status);return status;
fs/nfs/nfs4state.c +7 -3
@@ -1637,13 +1637,14 @@ static void nfs4_state_start_reclaim_rebnfs4_state_mark_reclaim_helper (clp, nfs4_state_mark_reclaim_reboot); } -static void nfs4_reclaim_complete (struct nfs_client *clp, +static int nfs4_reclaim_complete (struct nfs_client *clp,const struct nfs4_state_recovery_ops *ops,struct rpc_cred *cred) {/* Notify the server we're done reclaiming our state */ if (ops->reclaim_complete) - (void )ops->reclaim_complete (clp, cred); +return ops->reclaim_complete (clp, cred); +return 0 ; }static void nfs4_clear_reclaim_server (struct nfs_server *server)
@@ -1690,13 +1691,16 @@ static void nfs4_state_end_reclaim_reboo {const struct nfs4_state_recovery_ops *ops;struct rpc_cred *cred; +int err;if (!nfs4_state_clear_reclaim_reboot (clp))return ; ops = clp->cl_mvops->reboot_recovery_ops; cred =nfs4_get_clid_cred (clp); -nfs4_reclaim_complete (clp, ops, cred); + err =nfs4_reclaim_complete (clp, ops, cred);put_rpccred (cred); +if (err == -NFS4ERR_CONN_NOT_BOUND_TO_SESSION ) +set_bit (NFS4CLNT_RECLAIM_REBOOT , &clp->cl_state); }static void nfs4_state_start_reclaim_nograce (struct nfs_client *clp)
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/pnfs-flexfiles-missing-error-code-in-ff_layout_alloc_lseg.patch queue-4.9/nfsv4.1-work-around-a-linux-server-bug.patch queue-4.9/sunrpc-ensure-correct-error-is-reported-by-xs_tcp_setup_socket.patch queue-4.9/nfsv4.1-reclaim_complete-must-handle-nfs4err_conn_not_bound_to_session.patch