Commit 6ad477a6 authored by Benjamin Coddington's avatar Benjamin Coddington Committed by Trond Myklebust
Browse files

NFSv4: Clean up some shutdown loops



If a SEQUENCE call receives -EIO for a shutdown client, it will retry the
RPC call.  Instead of doing that for a shutdown client, just bail out.

Likewise, if the state manager decides to perform recovery for a shutdown
client, it will continuously retry.  As above, just bail out.

Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 7d3e26a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9371,7 +9371,7 @@ static void nfs41_sequence_call_done(struct rpc_task *task, void *data)
		return;

	trace_nfs4_sequence(clp, task->tk_status);
	if (task->tk_status < 0) {
	if (task->tk_status < 0 && !task->tk_client->cl_shutdown) {
		dprintk("%s ERROR %d\n", __func__, task->tk_status);
		if (refcount_read(&clp->cl_count) == 1)
			return;
+3 −0
Original line number Diff line number Diff line
@@ -1210,6 +1210,9 @@ void nfs4_schedule_state_manager(struct nfs_client *clp)
	struct task_struct *task;
	char buf[INET6_ADDRSTRLEN + sizeof("-manager") + 1];

	if (clp->cl_rpcclient->cl_shutdown)
		return;

	set_bit(NFS4CLNT_RUN_MANAGER, &clp->cl_state);
	if (test_and_set_bit(NFS4CLNT_MANAGER_AVAILABLE, &clp->cl_state) != 0) {
		wake_up_var(&clp->cl_state);