NFSD: Add a "default" block size

We'd like to increase the maximum r/wsize that NFSD can support,
but without introducing possible regressions. So let's add a
default setting of 1MB. A subsequent patch will raise the
maximum value but leave the default alone.

No behavior change is expected.

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

+8 -3
+7 -2
fs/nfsd/nfsd.h
··· 44 44 #include "stats.h" 45 45 46 46 /* 47 - * Maximum blocksizes supported by daemon under various circumstances. 47 + * Default and maximum payload size (NFS READ or WRITE), in bytes. 48 + * The default is historical, and the maximum is an implementation 49 + * limit. 48 50 */ 49 - #define NFSSVC_MAXBLKSIZE RPCSVC_MAXPAYLOAD 51 + enum { 52 + NFSSVC_DEFBLKSIZE = 1 * 1024 * 1024, 53 + NFSSVC_MAXBLKSIZE = RPCSVC_MAXPAYLOAD, 54 + }; 50 55 51 56 struct readdir_cd { 52 57 __be32 err; /* 0, nfserr, or nfserr_eof */
+1 -1
fs/nfsd/nfssvc.c
··· 582 582 */ 583 583 target >>= 12; 584 584 585 - ret = NFSSVC_MAXBLKSIZE; 585 + ret = NFSSVC_DEFBLKSIZE; 586 586 while (ret > target && ret >= 8*1024*2) 587 587 ret /= 2; 588 588 return ret;