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/nfs4xdr.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/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 0b1f3fcdd28a..4ddd04a1113e 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/proc_fs.h> | 46 | #include <linux/proc_fs.h> |
47 | #include <linux/kdev_t.h> | 47 | #include <linux/kdev_t.h> |
48 | #include <linux/sunrpc/clnt.h> | 48 | #include <linux/sunrpc/clnt.h> |
49 | #include <linux/sunrpc/msg_prot.h> | ||
49 | #include <linux/nfs.h> | 50 | #include <linux/nfs.h> |
50 | #include <linux/nfs4.h> | 51 | #include <linux/nfs4.h> |
51 | #include <linux/nfs_fs.h> | 52 | #include <linux/nfs_fs.h> |
@@ -677,6 +678,19 @@ static int nfs4_stat_to_errno(int); | |||
677 | decode_sequence_maxsz + \ | 678 | decode_sequence_maxsz + \ |
678 | decode_putrootfh_maxsz + \ | 679 | decode_putrootfh_maxsz + \ |
679 | decode_fsinfo_maxsz) | 680 | decode_fsinfo_maxsz) |
681 | |||
682 | const u32 nfs41_maxwrite_overhead = ((RPC_MAX_HEADER_WITH_AUTH + | ||
683 | compound_encode_hdr_maxsz + | ||
684 | encode_sequence_maxsz + | ||
685 | encode_putfh_maxsz + | ||
686 | encode_getattr_maxsz) * | ||
687 | XDR_UNIT); | ||
688 | |||
689 | const u32 nfs41_maxread_overhead = ((RPC_MAX_HEADER_WITH_AUTH + | ||
690 | compound_decode_hdr_maxsz + | ||
691 | decode_sequence_maxsz + | ||
692 | decode_putfh_maxsz) * | ||
693 | XDR_UNIT); | ||
680 | #endif /* CONFIG_NFS_V4_1 */ | 694 | #endif /* CONFIG_NFS_V4_1 */ |
681 | 695 | ||
682 | static const umode_t nfs_type2fmt[] = { | 696 | static const umode_t nfs_type2fmt[] = { |