aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-20 20:12:38 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-12-05 18:30:43 -0500
commitafa296103ea3841fdc81d9d66902fe49bb765527 (patch)
treeaca9d946be69a2614ed0c389f11bf562cc5c9749 /fs/nfs/nfs4state.c
parent87dda67e7386ba7d2164391ea58b34e028d8157b (diff)
NFSv4.1: Remove the state manager code to resize the slot table
The state manager no longer needs any special machinery to stop the session flow and resize the slot table. It is all done on the fly by the SEQUENCE op code now. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index c14b2c7ac8a7..3940cd43fa98 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -302,7 +302,6 @@ static void nfs41_finish_session_reset(struct nfs_client *clp)
302 clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); 302 clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
303 clear_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); 303 clear_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state);
304 /* create_session negotiated new slot table */ 304 /* create_session negotiated new slot table */
305 clear_bit(NFS4CLNT_RECALL_SLOT, &clp->cl_state);
306 clear_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state); 305 clear_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state);
307 nfs41_setup_state_renewal(clp); 306 nfs41_setup_state_renewal(clp);
308} 307}
@@ -1905,14 +1904,6 @@ void nfs4_schedule_session_recovery(struct nfs4_session *session, int err)
1905} 1904}
1906EXPORT_SYMBOL_GPL(nfs4_schedule_session_recovery); 1905EXPORT_SYMBOL_GPL(nfs4_schedule_session_recovery);
1907 1906
1908void nfs41_handle_recall_slot(struct nfs_client *clp)
1909{
1910 set_bit(NFS4CLNT_RECALL_SLOT, &clp->cl_state);
1911 dprintk("%s: scheduling slot recall for server %s\n", __func__,
1912 clp->cl_hostname);
1913 nfs4_schedule_state_manager(clp);
1914}
1915
1916static void nfs4_reset_all_state(struct nfs_client *clp) 1907static void nfs4_reset_all_state(struct nfs_client *clp)
1917{ 1908{
1918 if (test_and_set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) == 0) { 1909 if (test_and_set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) == 0) {
@@ -2022,20 +2013,6 @@ out:
2022 return status; 2013 return status;
2023} 2014}
2024 2015
2025static int nfs4_recall_slot(struct nfs_client *clp)
2026{
2027 struct nfs4_slot_table *fc_tbl;
2028 u32 new_size;
2029
2030 if (!nfs4_has_session(clp))
2031 return 0;
2032 nfs4_begin_drain_session(clp);
2033
2034 fc_tbl = &clp->cl_session->fc_slot_table;
2035 new_size = fc_tbl->server_highest_slotid + 1;
2036 return nfs4_resize_slot_table(fc_tbl, new_size, 1);
2037}
2038
2039static int nfs4_bind_conn_to_session(struct nfs_client *clp) 2016static int nfs4_bind_conn_to_session(struct nfs_client *clp)
2040{ 2017{
2041 struct rpc_cred *cred; 2018 struct rpc_cred *cred;
@@ -2066,7 +2043,6 @@ static int nfs4_bind_conn_to_session(struct nfs_client *clp)
2066#else /* CONFIG_NFS_V4_1 */ 2043#else /* CONFIG_NFS_V4_1 */
2067static int nfs4_reset_session(struct nfs_client *clp) { return 0; } 2044static int nfs4_reset_session(struct nfs_client *clp) { return 0; }
2068static int nfs4_end_drain_session(struct nfs_client *clp) { return 0; } 2045static int nfs4_end_drain_session(struct nfs_client *clp) { return 0; }
2069static int nfs4_recall_slot(struct nfs_client *clp) { return 0; }
2070 2046
2071static int nfs4_bind_conn_to_session(struct nfs_client *clp) 2047static int nfs4_bind_conn_to_session(struct nfs_client *clp)
2072{ 2048{
@@ -2126,15 +2102,6 @@ static void nfs4_state_manager(struct nfs_client *clp)
2126 continue; 2102 continue;
2127 } 2103 }
2128 2104
2129 /* Recall session slots */
2130 if (test_and_clear_bit(NFS4CLNT_RECALL_SLOT, &clp->cl_state)) {
2131 section = "recall slot";
2132 status = nfs4_recall_slot(clp);
2133 if (status < 0)
2134 goto out_error;
2135 continue;
2136 }
2137
2138 /* First recover reboot state... */ 2105 /* First recover reboot state... */
2139 if (test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) { 2106 if (test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) {
2140 section = "reclaim reboot"; 2107 section = "reclaim reboot";