nfs_fs_sb.h 2.1 KB

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