const.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * include/linux/nfsd/const.h
  3. *
  4. * Various constants related to NFS.
  5. *
  6. * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
  7. */
  8. #ifndef _LINUX_NFSD_CONST_H
  9. #define _LINUX_NFSD_CONST_H
  10. #include <linux/nfs.h>
  11. #include <linux/nfs2.h>
  12. #include <linux/nfs3.h>
  13. #include <linux/nfs4.h>
  14. /*
  15. * Maximum blocksizes supported by daemon under various circumstances.
  16. */
  17. #define NFSSVC_MAXBLKSIZE RPCSVC_MAXPAYLOAD
  18. /* NFSv2 is limited by the protocol specification, see RFC 1094 */
  19. #define NFSSVC_MAXBLKSIZE_V2 (8*1024)
  20. #ifdef __KERNEL__
  21. #include <linux/sunrpc/msg_prot.h>
  22. /*
  23. * Largest number of bytes we need to allocate for an NFS
  24. * call or reply. Used to control buffer sizes. We use
  25. * the length of v3 WRITE, READDIR and READDIR replies
  26. * which are an RPC header, up to 26 XDR units of reply
  27. * data, and some page data.
  28. *
  29. * Note that accuracy here doesn't matter too much as the
  30. * size is rounded up to a page size when allocating space.
  31. */
  32. #define NFSD_BUFSIZE ((RPC_MAX_HEADER_WITH_AUTH+26)*XDR_UNIT + NFSSVC_MAXBLKSIZE)
  33. #endif /* __KERNEL__ */
  34. #endif /* _LINUX_NFSD_CONST_H */