nfs_fs_sb.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef _NFS_FS_SB
  2. #define _NFS_FS_SB
  3. #include <linux/list.h>
  4. #include <linux/backing-dev.h>
  5. /*
  6. * NFS client parameters stored in the superblock.
  7. */
  8. struct nfs_server {
  9. struct rpc_clnt * client; /* RPC client handle */
  10. struct rpc_clnt * client_sys; /* 2nd handle for FSINFO */
  11. struct nfs_rpc_ops * rpc_ops; /* NFS protocol vector */
  12. struct backing_dev_info backing_dev_info;
  13. int flags; /* various flags */
  14. unsigned int caps; /* server capabilities */
  15. unsigned int rsize; /* read size */
  16. unsigned int rpages; /* read size (in pages) */
  17. unsigned int wsize; /* write size */
  18. unsigned int wpages; /* write size (in pages) */
  19. unsigned int wtmult; /* server disk block size */
  20. unsigned int dtsize; /* readdir size */
  21. unsigned int bsize; /* server block size */
  22. unsigned int acregmin; /* attr cache timeouts */
  23. unsigned int acregmax;
  24. unsigned int acdirmin;
  25. unsigned int acdirmax;
  26. unsigned int namelen;
  27. char * hostname; /* remote hostname */
  28. struct nfs_fh fh;
  29. struct sockaddr_in addr;
  30. #ifdef CONFIG_NFS_V4
  31. /* Our own IP address, as a null-terminated string.
  32. * This is used to generate the clientid, and the callback address.
  33. */
  34. char ip_addr[16];
  35. char * mnt_path;
  36. struct nfs4_client * nfs4_state; /* all NFSv4 state starts here */
  37. struct list_head nfs4_siblings; /* List of other nfs_server structs
  38. * that share the same clientid
  39. */
  40. u32 attr_bitmask[2];/* V4 bitmask representing the set
  41. of attributes supported on this
  42. filesystem */
  43. u32 acl_bitmask; /* V4 bitmask representing the ACEs
  44. that are supported on this
  45. filesystem */
  46. #endif
  47. };
  48. /* Server capabilities */
  49. #define NFS_CAP_READDIRPLUS (1U << 0)
  50. #define NFS_CAP_HARDLINKS (1U << 1)
  51. #define NFS_CAP_SYMLINKS (1U << 2)
  52. #define NFS_CAP_ACLS (1U << 3)
  53. #define NFS_CAP_ATOMIC_OPEN (1U << 4)
  54. #endif