summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-05 16:40:47 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-28 23:20:47 +0200
commit1a2dd948e2b1e27476982bc7dd6961585823aec5 (patch)
tree523ac8af6c059375c1700cd3a6d56565cde9ac0c /fs/nfs/nfs4state.c
parentNFS: add more context to state manager error mesgs (diff)
downloadlinux-1a2dd948e2b1e27476982bc7dd6961585823aec5.tar.xz
linux-1a2dd948e2b1e27476982bc7dd6961585823aec5.zip
NFSv4.1: Handle slot recalls before doing state recovery
Handling a slot recall situation should always takes precedence over state recovery to allow the server to manage its resources. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 76bbac367880..da62f66a85ad 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1814,7 +1814,6 @@ static int nfs4_recall_slot(struct nfs_client *clp)
spin_unlock(&fc_tbl->slot_tbl_lock);
kfree(old);
- nfs4_end_drain_session(clp);
return 0;
}
@@ -1920,6 +1919,16 @@ static void nfs4_state_manager(struct nfs_client *clp)
continue;
}
+ /* Recall session slots */
+ if (test_and_clear_bit(NFS4CLNT_RECALL_SLOT, &clp->cl_state)
+ && nfs4_has_session(clp)) {
+ section = "recall slot";
+ status = nfs4_recall_slot(clp);
+ if (status < 0)
+ goto out_error;
+ continue;
+ }
+
/* First recover reboot state... */
if (test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) {
section = "reclaim reboot";
@@ -1953,16 +1962,6 @@ static void nfs4_state_manager(struct nfs_client *clp)
nfs_client_return_marked_delegations(clp);
continue;
}
- /* Recall session slots */
- if (test_and_clear_bit(NFS4CLNT_RECALL_SLOT, &clp->cl_state)
- && nfs4_has_session(clp)) {
- section = "recall slot";
- status = nfs4_recall_slot(clp);
- if (status < 0)
- goto out_error;
- continue;
- }
-
nfs4_clear_state_manager_bit(clp);
/* Did we race with an attempt to give us more work? */