diff options
-rw-r--r-- | fs/nfs/callback_proc.c | 1 | ||||
-rw-r--r-- | fs/nfs/nfs4_fs.h | 4 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 17 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 33 |
4 files changed, 0 insertions, 55 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index a0546eca6f6b..8610bd1d136d 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
@@ -570,7 +570,6 @@ __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy, | |||
570 | status = htonl(NFS4_OK); | 570 | status = htonl(NFS4_OK); |
571 | 571 | ||
572 | nfs41_set_target_slotid(fc_tbl, args->crsa_target_highest_slotid); | 572 | nfs41_set_target_slotid(fc_tbl, args->crsa_target_highest_slotid); |
573 | nfs41_handle_recall_slot(cps->clp); | ||
574 | out: | 573 | out: |
575 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); | 574 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); |
576 | return status; | 575 | return status; |
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 856bc496a210..fa1a055a8fe9 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -21,7 +21,6 @@ enum nfs4_client_state { | |||
21 | NFS4CLNT_RECLAIM_NOGRACE, | 21 | NFS4CLNT_RECLAIM_NOGRACE, |
22 | NFS4CLNT_DELEGRETURN, | 22 | NFS4CLNT_DELEGRETURN, |
23 | NFS4CLNT_SESSION_RESET, | 23 | NFS4CLNT_SESSION_RESET, |
24 | NFS4CLNT_RECALL_SLOT, | ||
25 | NFS4CLNT_LEASE_CONFIRM, | 24 | NFS4CLNT_LEASE_CONFIRM, |
26 | NFS4CLNT_SERVER_SCOPE_MISMATCH, | 25 | NFS4CLNT_SERVER_SCOPE_MISMATCH, |
27 | NFS4CLNT_PURGE_STATE, | 26 | NFS4CLNT_PURGE_STATE, |
@@ -260,8 +259,6 @@ extern int nfs4_proc_layoutcommit(struct nfs4_layoutcommit_data *data, | |||
260 | 259 | ||
261 | extern void nfs41_set_target_slotid(struct nfs4_slot_table *tbl, | 260 | extern void nfs41_set_target_slotid(struct nfs4_slot_table *tbl, |
262 | u32 target_highest_slotid); | 261 | u32 target_highest_slotid); |
263 | extern int nfs4_resize_slot_table(struct nfs4_slot_table *tbl, | ||
264 | u32 max_reqs, u32 ivalue); | ||
265 | 262 | ||
266 | static inline bool | 263 | static inline bool |
267 | is_ds_only_client(struct nfs_client *clp) | 264 | is_ds_only_client(struct nfs_client *clp) |
@@ -358,7 +355,6 @@ extern void nfs4_schedule_state_manager(struct nfs_client *); | |||
358 | extern void nfs4_schedule_path_down_recovery(struct nfs_client *clp); | 355 | extern void nfs4_schedule_path_down_recovery(struct nfs_client *clp); |
359 | extern void nfs4_schedule_stateid_recovery(const struct nfs_server *, struct nfs4_state *); | 356 | extern void nfs4_schedule_stateid_recovery(const struct nfs_server *, struct nfs4_state *); |
360 | extern void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags); | 357 | extern void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags); |
361 | extern void nfs41_handle_recall_slot(struct nfs_client *clp); | ||
362 | extern void nfs41_handle_server_scope(struct nfs_client *, | 358 | extern void nfs41_handle_server_scope(struct nfs_client *, |
363 | struct nfs41_server_scope **); | 359 | struct nfs41_server_scope **); |
364 | extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); | 360 | extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index fc65300172e1..0642e28704de 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -5830,23 +5830,6 @@ out: | |||
5830 | return ret; | 5830 | return ret; |
5831 | } | 5831 | } |
5832 | 5832 | ||
5833 | int nfs4_resize_slot_table(struct nfs4_slot_table *tbl, | ||
5834 | u32 max_reqs, u32 ivalue) | ||
5835 | { | ||
5836 | int ret; | ||
5837 | |||
5838 | if (max_reqs > NFS4_MAX_SLOT_TABLE) | ||
5839 | max_reqs = NFS4_MAX_SLOT_TABLE; | ||
5840 | ret = nfs4_grow_slot_table(tbl, max_reqs, ivalue); | ||
5841 | if (ret) | ||
5842 | return ret; | ||
5843 | spin_lock(&tbl->slot_tbl_lock); | ||
5844 | nfs4_shrink_slot_table(tbl, max_reqs); | ||
5845 | tbl->max_slotid = max_reqs - 1; | ||
5846 | spin_unlock(&tbl->slot_tbl_lock); | ||
5847 | return 0; | ||
5848 | } | ||
5849 | |||
5850 | /* Destroy the slot table */ | 5833 | /* Destroy the slot table */ |
5851 | static void nfs4_destroy_slot_tables(struct nfs4_session *session) | 5834 | static void nfs4_destroy_slot_tables(struct nfs4_session *session) |
5852 | { | 5835 | { |
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 | } |
1906 | EXPORT_SYMBOL_GPL(nfs4_schedule_session_recovery); | 1905 | EXPORT_SYMBOL_GPL(nfs4_schedule_session_recovery); |
1907 | 1906 | ||
1908 | void 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 | |||
1916 | static void nfs4_reset_all_state(struct nfs_client *clp) | 1907 | static 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 | ||
2025 | static 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 | |||
2039 | static int nfs4_bind_conn_to_session(struct nfs_client *clp) | 2016 | static 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 */ |
2067 | static int nfs4_reset_session(struct nfs_client *clp) { return 0; } | 2044 | static int nfs4_reset_session(struct nfs_client *clp) { return 0; } |
2068 | static int nfs4_end_drain_session(struct nfs_client *clp) { return 0; } | 2045 | static int nfs4_end_drain_session(struct nfs_client *clp) { return 0; } |
2069 | static int nfs4_recall_slot(struct nfs_client *clp) { return 0; } | ||
2070 | 2046 | ||
2071 | static int nfs4_bind_conn_to_session(struct nfs_client *clp) | 2047 | static 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"; |