aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-09-23 21:32:21 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-09-28 12:40:15 -0400
commitddc04fd4d5163aee9ebdb38a56c365b602e2b7b7 (patch)
tree6cb3c4abed9f0cbefbd2086c6e946ac312684f61 /fs
parentf39bde24b275ddc45df1ed835725b609e178c7a0 (diff)
nfsd41: use sv_max_mesg for forechannel max sizes
ca_maxresponsesize and ca_maxrequest size include the RPC header. sv_max_mesg is sv_max_payolad plus a page for overhead and is used in svc_init_buffer to allocate server buffer space for both the request and reply. Note that this means we can service an RPC compound that requires ca_maxrequestsize (MAXWRITE) or ca_max_responsesize (MAXREAD) but that we do not support an RPC compound that requires both ca_maxrequestsize and ca_maxresponsesize. Signed-off-by: Andy Adamson <andros@netapp.com> [bfields@citi.umich.edu: more documentation updates] Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 2153f9bdbebd..fcb9817881a1 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -477,13 +477,14 @@ static int set_forechannel_drc_size(struct nfsd4_channel_attrs *fchan)
477 477
478/* 478/*
479 * fchan holds the client values on input, and the server values on output 479 * fchan holds the client values on input, and the server values on output
480 * sv_max_mesg is the maximum payload plus one page for overhead.
480 */ 481 */
481static int init_forechannel_attrs(struct svc_rqst *rqstp, 482static int init_forechannel_attrs(struct svc_rqst *rqstp,
482 struct nfsd4_channel_attrs *session_fchan, 483 struct nfsd4_channel_attrs *session_fchan,
483 struct nfsd4_channel_attrs *fchan) 484 struct nfsd4_channel_attrs *fchan)
484{ 485{
485 int status = 0; 486 int status = 0;
486 __u32 maxcount = svc_max_payload(rqstp); 487 __u32 maxcount = nfsd_serv->sv_max_mesg;
487 488
488 /* headerpadsz set to zero in encode routine */ 489 /* headerpadsz set to zero in encode routine */
489 490