diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-02 13:58:30 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:39 -0400 |
commit | e6889620e89525ebf41f0eed937edb3dc065cf1d (patch) | |
tree | 7037851dee3ef48e0af6c80840b4c2caede3c96e /fs/nfs/nfs4xdr.c | |
parent | 2cebf82883f49fd26148da5d9a43d1b4363f1d59 (diff) |
NFSv4: Fix underestimate of NFSv4 lookup request size
Also fix up the underestimate of fs_locations
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index f6068bf3823a..4c8f67d47523 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -119,8 +119,8 @@ static int nfs4_stat_to_errno(int); | |||
119 | 3 + (NFS4_VERIFIER_SIZE >> 2)) | 119 | 3 + (NFS4_VERIFIER_SIZE >> 2)) |
120 | #define decode_setclientid_confirm_maxsz \ | 120 | #define decode_setclientid_confirm_maxsz \ |
121 | (op_decode_hdr_maxsz) | 121 | (op_decode_hdr_maxsz) |
122 | #define encode_lookup_maxsz (op_encode_hdr_maxsz + \ | 122 | #define encode_lookup_maxsz (op_encode_hdr_maxsz + nfs4_name_maxsz) |
123 | 1 + ((3 + NFS4_FHSIZE) >> 2)) | 123 | #define decode_lookup_maxsz (op_decode_hdr_maxsz) |
124 | #define encode_share_access_maxsz \ | 124 | #define encode_share_access_maxsz \ |
125 | (2) | 125 | (2) |
126 | #define encode_createmode_maxsz (1 + nfs4_fattr_maxsz) | 126 | #define encode_createmode_maxsz (1 + nfs4_fattr_maxsz) |
@@ -161,6 +161,10 @@ static int nfs4_stat_to_errno(int); | |||
161 | nfs4_fattr_bitmap_maxsz) | 161 | nfs4_fattr_bitmap_maxsz) |
162 | #define encode_delegreturn_maxsz (op_encode_hdr_maxsz + 4) | 162 | #define encode_delegreturn_maxsz (op_encode_hdr_maxsz + 4) |
163 | #define decode_delegreturn_maxsz (op_decode_hdr_maxsz) | 163 | #define decode_delegreturn_maxsz (op_decode_hdr_maxsz) |
164 | #define encode_fs_locations_maxsz \ | ||
165 | (encode_getattr_maxsz) | ||
166 | #define decode_fs_locations_maxsz \ | ||
167 | (0) | ||
164 | #define NFS4_enc_compound_sz (1024) /* XXX: large enough? */ | 168 | #define NFS4_enc_compound_sz (1024) /* XXX: large enough? */ |
165 | #define NFS4_dec_compound_sz (1024) /* XXX: large enough? */ | 169 | #define NFS4_dec_compound_sz (1024) /* XXX: large enough? */ |
166 | #define NFS4_enc_read_sz (compound_encode_hdr_maxsz + \ | 170 | #define NFS4_enc_read_sz (compound_encode_hdr_maxsz + \ |
@@ -327,7 +331,7 @@ static int nfs4_stat_to_errno(int); | |||
327 | encode_getfh_maxsz) | 331 | encode_getfh_maxsz) |
328 | #define NFS4_dec_lookup_sz (compound_decode_hdr_maxsz + \ | 332 | #define NFS4_dec_lookup_sz (compound_decode_hdr_maxsz + \ |
329 | decode_putfh_maxsz + \ | 333 | decode_putfh_maxsz + \ |
330 | op_decode_hdr_maxsz + \ | 334 | decode_lookup_maxsz + \ |
331 | decode_getattr_maxsz + \ | 335 | decode_getattr_maxsz + \ |
332 | decode_getfh_maxsz) | 336 | decode_getfh_maxsz) |
333 | #define NFS4_enc_lookup_root_sz (compound_encode_hdr_maxsz + \ | 337 | #define NFS4_enc_lookup_root_sz (compound_encode_hdr_maxsz + \ |
@@ -446,12 +450,13 @@ static int nfs4_stat_to_errno(int); | |||
446 | #define NFS4_enc_fs_locations_sz \ | 450 | #define NFS4_enc_fs_locations_sz \ |
447 | (compound_encode_hdr_maxsz + \ | 451 | (compound_encode_hdr_maxsz + \ |
448 | encode_putfh_maxsz + \ | 452 | encode_putfh_maxsz + \ |
449 | encode_getattr_maxsz) | 453 | encode_lookup_maxsz + \ |
454 | encode_fs_locations_maxsz) | ||
450 | #define NFS4_dec_fs_locations_sz \ | 455 | #define NFS4_dec_fs_locations_sz \ |
451 | (compound_decode_hdr_maxsz + \ | 456 | (compound_decode_hdr_maxsz + \ |
452 | decode_putfh_maxsz + \ | 457 | decode_putfh_maxsz + \ |
453 | op_decode_hdr_maxsz + \ | 458 | decode_lookup_maxsz + \ |
454 | nfs4_fattr_bitmap_maxsz) | 459 | decode_fs_locations_maxsz) |
455 | 460 | ||
456 | static struct { | 461 | static struct { |
457 | unsigned int mode; | 462 | unsigned int mode; |