diff options
author | J. Bruce Fields <bfields@redhat.com> | 2014-08-21 15:04:31 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-10-21 09:10:50 -0400 |
commit | d1d84c9626bb3a519863b3ffc40d347166f9fb83 (patch) | |
tree | 571a9c4c92e3e5ca1ffd8e12d888ea991928fcd1 | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) |
nfsd4: fix response size estimation for OP_SEQUENCE
We added this new estimator function but forgot to hook it up. The
effect is that NFSv4.1 (and greater) won't do zero-copy reads.
The estimate was also wrong by 8 bytes.
Fixes: ccae70a9ee41 "nfsd4: estimate sequence response size"
Cc: stable@vger.kernel.org
Reported-by: Chuck Lever <chucklever@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | fs/nfsd/nfs4proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index cdeb3cfd6f32..f4bd578bed55 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -1589,7 +1589,8 @@ static inline u32 nfsd4_rename_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op | |||
1589 | static inline u32 nfsd4_sequence_rsize(struct svc_rqst *rqstp, | 1589 | static inline u32 nfsd4_sequence_rsize(struct svc_rqst *rqstp, |
1590 | struct nfsd4_op *op) | 1590 | struct nfsd4_op *op) |
1591 | { | 1591 | { |
1592 | return NFS4_MAX_SESSIONID_LEN + 20; | 1592 | return (op_encode_hdr_size |
1593 | + XDR_QUADLEN(NFS4_MAX_SESSIONID_LEN) + 5) * sizeof(__be32); | ||
1593 | } | 1594 | } |
1594 | 1595 | ||
1595 | static inline u32 nfsd4_setattr_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) | 1596 | static inline u32 nfsd4_setattr_rsize(struct svc_rqst *rqstp, struct nfsd4_op *op) |
@@ -1893,6 +1894,7 @@ static struct nfsd4_operation nfsd4_ops[] = { | |||
1893 | .op_func = (nfsd4op_func)nfsd4_sequence, | 1894 | .op_func = (nfsd4op_func)nfsd4_sequence, |
1894 | .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP, | 1895 | .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP, |
1895 | .op_name = "OP_SEQUENCE", | 1896 | .op_name = "OP_SEQUENCE", |
1897 | .op_rsize_bop = (nfsd4op_rsize)nfsd4_sequence_rsize, | ||
1896 | }, | 1898 | }, |
1897 | [OP_DESTROY_CLIENTID] = { | 1899 | [OP_DESTROY_CLIENTID] = { |
1898 | .op_func = (nfsd4op_func)nfsd4_destroy_clientid, | 1900 | .op_func = (nfsd4op_func)nfsd4_destroy_clientid, |