diff options
Diffstat (limited to 'include/linux/nfsd/const.h')
-rw-r--r-- | include/linux/nfsd/const.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/nfsd/const.h b/include/linux/nfsd/const.h index b75bb1b38d09..f0cc77790527 100644 --- a/include/linux/nfsd/const.h +++ b/include/linux/nfsd/const.h | |||
@@ -20,17 +20,31 @@ | |||
20 | #define NFSSVC_MAXVERS 3 | 20 | #define NFSSVC_MAXVERS 3 |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Maximum blocksize supported by daemon currently at 32K | 23 | * Maximum blocksizes supported by daemon under various circumstances. |
24 | */ | 24 | */ |
25 | #define NFSSVC_MAXBLKSIZE (32*1024) | 25 | #define NFSSVC_MAXBLKSIZE RPCSVC_MAXPAYLOAD |
26 | /* NFSv2 is limited by the protocol specification, see RFC 1094 */ | ||
27 | #define NFSSVC_MAXBLKSIZE_V2 (8*1024) | ||
26 | 28 | ||
27 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
28 | 30 | ||
31 | #include <linux/sunrpc/msg_prot.h> | ||
32 | |||
29 | #ifndef NFS_SUPER_MAGIC | 33 | #ifndef NFS_SUPER_MAGIC |
30 | # define NFS_SUPER_MAGIC 0x6969 | 34 | # define NFS_SUPER_MAGIC 0x6969 |
31 | #endif | 35 | #endif |
32 | 36 | ||
33 | #define NFSD_BUFSIZE (1024 + NFSSVC_MAXBLKSIZE) | 37 | /* |
38 | * Largest number of bytes we need to allocate for an NFS | ||
39 | * call or reply. Used to control buffer sizes. We use | ||
40 | * the length of v3 WRITE, READDIR and READDIR replies | ||
41 | * which are an RPC header, up to 26 XDR units of reply | ||
42 | * data, and some page data. | ||
43 | * | ||
44 | * Note that accuracy here doesn't matter too much as the | ||
45 | * size is rounded up to a page size when allocating space. | ||
46 | */ | ||
47 | #define NFSD_BUFSIZE ((RPC_MAX_HEADER_WITH_AUTH+26)*XDR_UNIT + NFSSVC_MAXBLKSIZE) | ||
34 | 48 | ||
35 | #ifdef CONFIG_NFSD_V4 | 49 | #ifdef CONFIG_NFSD_V4 |
36 | # define NFSSVC_XDRSIZE NFS4_SVC_XDRSIZE | 50 | # define NFSSVC_XDRSIZE NFS4_SVC_XDRSIZE |