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