nfs_fs_sb.h 1.9 KB

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