aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2013-06-26 12:21:49 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-06-28 15:55:19 -0400
commit18aad3d552c73adf2652a34baf0fe766058018e4 (patch)
treec4291710ff620be3ed2935cbd250d33137f84015 /fs/nfs/nfs4proc.c
parent9111c95b077a81573fb27df3ba8255d0a3a9ebdf (diff)
NFSv4.1 Refactor nfs4_init_session and nfs4_init_channel_attrs
nfs4_init_session was originally written to be called prior to nfs4_init_channel_attrs, setting the session target_max response and request sizes that nfs4_init_channel_attrs would pay attention to. In the current code flow, nfs4_init_session, just like nfs4_init_ds_session for the data server case, is called after the session is all negotiated, and is actually used in a RECLAIM COMPLETE call to the server. Remove the un-needed fc_target_max response and request fields from nfs4_session and just set the max_resp_sz and max_rqst_sz in nfs4_init_channel_attrs. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 83e0e1de7ecf..6d46f966d169 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5792,17 +5792,14 @@ int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo)
5792 */ 5792 */
5793static void nfs4_init_channel_attrs(struct nfs41_create_session_args *args) 5793static void nfs4_init_channel_attrs(struct nfs41_create_session_args *args)
5794{ 5794{
5795 struct nfs4_session *session = args->client->cl_session; 5795 unsigned int max_rqst_sz, max_resp_sz;
5796 unsigned int mxrqst_sz = session->fc_target_max_rqst_sz, 5796
5797 mxresp_sz = session->fc_target_max_resp_sz; 5797 max_rqst_sz = NFS_MAX_FILE_IO_SIZE + nfs41_maxwrite_overhead;
5798 5798 max_resp_sz = NFS_MAX_FILE_IO_SIZE + nfs41_maxread_overhead;
5799 if (mxrqst_sz == 0) 5799
5800 mxrqst_sz = NFS_MAX_FILE_IO_SIZE;
5801 if (mxresp_sz == 0)
5802 mxresp_sz = NFS_MAX_FILE_IO_SIZE;
5803 /* Fore channel attributes */ 5800 /* Fore channel attributes */
5804 args->fc_attrs.max_rqst_sz = mxrqst_sz; 5801 args->fc_attrs.max_rqst_sz = max_rqst_sz;
5805 args->fc_attrs.max_resp_sz = mxresp_sz; 5802 args->fc_attrs.max_resp_sz = max_resp_sz;
5806 args->fc_attrs.max_ops = NFS4_MAX_OPS; 5803 args->fc_attrs.max_ops = NFS4_MAX_OPS;
5807 args->fc_attrs.max_reqs = max_session_slots; 5804 args->fc_attrs.max_reqs = max_session_slots;
5808 5805