diff options
author | Alexandros Batsakis <batsakis@netapp.com> | 2009-12-05 13:36:55 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-12-05 13:36:55 -0500 |
commit | 2449ea2e191123729b2dc37a06fcb9d6ea7e2736 (patch) | |
tree | f5b71099baefb6c550511b3d5f3da26b8c384454 /fs/nfs/nfs4proc.c | |
parent | 7b183d0d432ab3525ae29511a5348ead3e790620 (diff) |
nfs41: V2 adjust max_rqst_sz, max_resp_sz w.r.t to rsize, wsize
The v4.1 client should take into account the desired rsize, wsize when
negotiating the max size in CREATE_SESSION. Accordingly, it should use
rsize, wsize that are smaller than the session negotiated values.
Signed-off-by: Alexandros Batsakis <batsakis@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index dfd1ea99e2d6..d897b9e34f12 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -4862,13 +4862,16 @@ int nfs4_proc_destroy_session(struct nfs4_session *session) | |||
4862 | int nfs4_init_session(struct nfs_server *server) | 4862 | int nfs4_init_session(struct nfs_server *server) |
4863 | { | 4863 | { |
4864 | struct nfs_client *clp = server->nfs_client; | 4864 | struct nfs_client *clp = server->nfs_client; |
4865 | struct nfs4_session *session; | ||
4865 | int ret; | 4866 | int ret; |
4866 | 4867 | ||
4867 | if (!nfs4_has_session(clp)) | 4868 | if (!nfs4_has_session(clp)) |
4868 | return 0; | 4869 | return 0; |
4869 | 4870 | ||
4870 | clp->cl_session->fc_attrs.max_rqst_sz = server->wsize; | 4871 | session = clp->cl_session; |
4871 | clp->cl_session->fc_attrs.max_resp_sz = server->rsize; | 4872 | session->fc_attrs.max_rqst_sz = server->wsize + nfs41_maxwrite_overhead; |
4873 | session->fc_attrs.max_resp_sz = server->rsize + nfs41_maxread_overhead; | ||
4874 | |||
4872 | ret = nfs4_recover_expired_lease(server); | 4875 | ret = nfs4_recover_expired_lease(server); |
4873 | if (!ret) | 4876 | if (!ret) |
4874 | ret = nfs4_check_client_ready(clp); | 4877 | ret = nfs4_check_client_ready(clp); |