SUNRPC: Bump the maximum payload size for the server

Increase the maximum server-side RPC payload to 4MB. The default
remains at 1MB.

An API to adjust the operational maximum was added in 2006 by commit
596bbe53eb3a ("[PATCH] knfsd: Allow max size of NFSd payload to be
configured"). To adjust the operational maximum using this API, shut
down the NFS server. Then echo a new value into:

/proc/fs/nfsd/max_block_size

And restart the NFS server.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

+7 -7
+7 -7
include/linux/sunrpc/svc.h
··· 119 * Linux limit; someone who cares more about NFS/UDP performance 120 * can test a larger number. 121 * 122 - * For TCP transports we have more freedom. A size of 1MB is 123 - * chosen to match the client limit. Other OSes are known to 124 - * have larger limits, but those numbers are probably beyond 125 - * the point of diminishing returns. 126 */ 127 - #define RPCSVC_MAXPAYLOAD (1*1024*1024u) 128 - #define RPCSVC_MAXPAYLOAD_TCP RPCSVC_MAXPAYLOAD 129 - #define RPCSVC_MAXPAYLOAD_UDP (32*1024u) 130 131 extern u32 svc_max_payload(const struct svc_rqst *rqstp); 132
··· 119 * Linux limit; someone who cares more about NFS/UDP performance 120 * can test a larger number. 121 * 122 + * For non-UDP transports we have more freedom. A size of 4MB is 123 + * chosen to accommodate clients that support larger I/O sizes. 124 */ 125 + enum { 126 + RPCSVC_MAXPAYLOAD = 4 * 1024 * 1024, 127 + RPCSVC_MAXPAYLOAD_TCP = RPCSVC_MAXPAYLOAD, 128 + RPCSVC_MAXPAYLOAD_UDP = 32 * 1024, 129 + }; 130 131 extern u32 svc_max_payload(const struct svc_rqst *rqstp); 132