···1111#include <linux/types.h>1212#include <linux/mount.h>13131414+#include <linux/nfs.h>1515+#include <linux/nfs2.h>1616+#include <linux/nfs3.h>1717+#include <linux/nfs4.h>1818+#include <linux/sunrpc/msg_prot.h>1919+1420#include <linux/nfsd/debug.h>1521#include <linux/nfsd/export.h>1622#include <linux/nfsd/stats.h>2323+1724/*1825 * nfsd version1926 */2027#define NFSD_SUPPORTED_MINOR_VERSION 12828+/*2929+ * Maximum blocksizes supported by daemon under various circumstances.3030+ */3131+#define NFSSVC_MAXBLKSIZE RPCSVC_MAXPAYLOAD3232+/* NFSv2 is limited by the protocol specification, see RFC 1094 */3333+#define NFSSVC_MAXBLKSIZE_V2 (8*1024)3434+3535+3636+/*3737+ * Largest number of bytes we need to allocate for an NFS3838+ * call or reply. Used to control buffer sizes. We use3939+ * the length of v3 WRITE, READDIR and READDIR replies4040+ * which are an RPC header, up to 26 XDR units of reply4141+ * data, and some page data.4242+ *4343+ * Note that accuracy here doesn't matter too much as the4444+ * size is rounded up to a page size when allocating space.4545+ */4646+#define NFSD_BUFSIZE ((RPC_MAX_HEADER_WITH_AUTH+26)*XDR_UNIT + NFSSVC_MAXBLKSIZE)21472248struct readdir_cd {2349 __be32 err; /* 0, nfserr, or nfserr_eof */
···11-/*22- * include/linux/nfsd/const.h33- *44- * Various constants related to NFS.55- *66- * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>77- */88-99-#ifndef _LINUX_NFSD_CONST_H1010-#define _LINUX_NFSD_CONST_H1111-1212-#include <linux/nfs.h>1313-#include <linux/nfs2.h>1414-#include <linux/nfs3.h>1515-#include <linux/nfs4.h>1616-1717-/*1818- * Maximum blocksizes supported by daemon under various circumstances.1919- */2020-#define NFSSVC_MAXBLKSIZE RPCSVC_MAXPAYLOAD2121-/* NFSv2 is limited by the protocol specification, see RFC 1094 */2222-#define NFSSVC_MAXBLKSIZE_V2 (8*1024)2323-2424-#ifdef __KERNEL__2525-2626-#include <linux/sunrpc/msg_prot.h>2727-2828-/*2929- * Largest number of bytes we need to allocate for an NFS3030- * call or reply. Used to control buffer sizes. We use3131- * the length of v3 WRITE, READDIR and READDIR replies3232- * which are an RPC header, up to 26 XDR units of reply3333- * data, and some page data.3434- *3535- * Note that accuracy here doesn't matter too much as the3636- * size is rounded up to a page size when allocating space.3737- */3838-#define NFSD_BUFSIZE ((RPC_MAX_HEADER_WITH_AUTH+26)*XDR_UNIT + NFSSVC_MAXBLKSIZE)3939-4040-#endif /* __KERNEL__ */4141-4242-#endif /* _LINUX_NFSD_CONST_H */
+5-2
include/linux/nfsd/nfsfh.h
···1414#ifndef _LINUX_NFSD_FH_H1515#define _LINUX_NFSD_FH_H16161717-# include <linux/types.h>1717+#include <linux/types.h>1818+#include <linux/nfs.h>1919+#include <linux/nfs2.h>2020+#include <linux/nfs3.h>2121+#include <linux/nfs4.h>1822#ifdef __KERNEL__1923# include <linux/sunrpc/svc.h>2024#endif2121-#include <linux/nfsd/const.h>22252326/*2427 * This is the old "dentry style" Linux NFSv2 file handle.