diff options
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r-- | include/linux/nfs_fs.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 6c2066caeaab..36f5bcf513b0 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef _LINUX_NFS_FS_H | 9 | #ifndef _LINUX_NFS_FS_H |
10 | #define _LINUX_NFS_FS_H | 10 | #define _LINUX_NFS_FS_H |
11 | 11 | ||
12 | #include <linux/magic.h> | ||
13 | |||
12 | /* | 14 | /* |
13 | * Enable debugging support for nfs client. | 15 | * Enable debugging support for nfs client. |
14 | * Requires RPC_DEBUG. | 16 | * Requires RPC_DEBUG. |
@@ -22,11 +24,6 @@ | |||
22 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) | 24 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) |
23 | 25 | ||
24 | /* | 26 | /* |
25 | * superblock magic number for NFS | ||
26 | */ | ||
27 | #define NFS_SUPER_MAGIC 0x6969 | ||
28 | |||
29 | /* | ||
30 | * When flushing a cluster of dirty pages, there can be different | 27 | * When flushing a cluster of dirty pages, there can be different |
31 | * strategies: | 28 | * strategies: |
32 | */ | 29 | */ |
@@ -42,6 +39,7 @@ | |||
42 | #include <linux/in.h> | 39 | #include <linux/in.h> |
43 | #include <linux/mm.h> | 40 | #include <linux/mm.h> |
44 | #include <linux/pagemap.h> | 41 | #include <linux/pagemap.h> |
42 | #include <linux/rbtree.h> | ||
45 | #include <linux/rwsem.h> | 43 | #include <linux/rwsem.h> |
46 | #include <linux/wait.h> | 44 | #include <linux/wait.h> |
47 | 45 | ||
@@ -69,6 +67,8 @@ | |||
69 | * NFSv3/v4 Access mode cache entry | 67 | * NFSv3/v4 Access mode cache entry |
70 | */ | 68 | */ |
71 | struct nfs_access_entry { | 69 | struct nfs_access_entry { |
70 | struct rb_node rb_node; | ||
71 | struct list_head lru; | ||
72 | unsigned long jiffies; | 72 | unsigned long jiffies; |
73 | struct rpc_cred * cred; | 73 | struct rpc_cred * cred; |
74 | int mask; | 74 | int mask; |
@@ -145,7 +145,9 @@ struct nfs_inode { | |||
145 | */ | 145 | */ |
146 | atomic_t data_updates; | 146 | atomic_t data_updates; |
147 | 147 | ||
148 | struct nfs_access_entry cache_access; | 148 | struct rb_root access_cache; |
149 | struct list_head access_cache_entry_lru; | ||
150 | struct list_head access_cache_inode_lru; | ||
149 | #ifdef CONFIG_NFS_V3_ACL | 151 | #ifdef CONFIG_NFS_V3_ACL |
150 | struct posix_acl *acl_access; | 152 | struct posix_acl *acl_access; |
151 | struct posix_acl *acl_default; | 153 | struct posix_acl *acl_default; |
@@ -199,6 +201,7 @@ struct nfs_inode { | |||
199 | #define NFS_INO_REVALIDATING (0) /* revalidating attrs */ | 201 | #define NFS_INO_REVALIDATING (0) /* revalidating attrs */ |
200 | #define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ | 202 | #define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ |
201 | #define NFS_INO_STALE (2) /* possible stale inode */ | 203 | #define NFS_INO_STALE (2) /* possible stale inode */ |
204 | #define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */ | ||
202 | 205 | ||
203 | static inline struct nfs_inode *NFS_I(struct inode *inode) | 206 | static inline struct nfs_inode *NFS_I(struct inode *inode) |
204 | { | 207 | { |
@@ -209,8 +212,7 @@ static inline struct nfs_inode *NFS_I(struct inode *inode) | |||
209 | #define NFS_FH(inode) (&NFS_I(inode)->fh) | 212 | #define NFS_FH(inode) (&NFS_I(inode)->fh) |
210 | #define NFS_SERVER(inode) (NFS_SB(inode->i_sb)) | 213 | #define NFS_SERVER(inode) (NFS_SB(inode->i_sb)) |
211 | #define NFS_CLIENT(inode) (NFS_SERVER(inode)->client) | 214 | #define NFS_CLIENT(inode) (NFS_SERVER(inode)->client) |
212 | #define NFS_PROTO(inode) (NFS_SERVER(inode)->rpc_ops) | 215 | #define NFS_PROTO(inode) (NFS_SERVER(inode)->nfs_client->rpc_ops) |
213 | #define NFS_ADDR(inode) (RPC_PEERADDR(NFS_CLIENT(inode))) | ||
214 | #define NFS_COOKIEVERF(inode) (NFS_I(inode)->cookieverf) | 216 | #define NFS_COOKIEVERF(inode) (NFS_I(inode)->cookieverf) |
215 | #define NFS_READTIME(inode) (NFS_I(inode)->read_cache_jiffies) | 217 | #define NFS_READTIME(inode) (NFS_I(inode)->read_cache_jiffies) |
216 | #define NFS_CHANGE_ATTR(inode) (NFS_I(inode)->change_attr) | 218 | #define NFS_CHANGE_ATTR(inode) (NFS_I(inode)->change_attr) |
@@ -297,6 +299,7 @@ extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | |||
297 | extern int nfs_permission(struct inode *, int, struct nameidata *); | 299 | extern int nfs_permission(struct inode *, int, struct nameidata *); |
298 | extern int nfs_access_get_cached(struct inode *, struct rpc_cred *, struct nfs_access_entry *); | 300 | extern int nfs_access_get_cached(struct inode *, struct rpc_cred *, struct nfs_access_entry *); |
299 | extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *); | 301 | extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *); |
302 | extern void nfs_access_zap_cache(struct inode *inode); | ||
300 | extern int nfs_open(struct inode *, struct file *); | 303 | extern int nfs_open(struct inode *, struct file *); |
301 | extern int nfs_release(struct inode *, struct file *); | 304 | extern int nfs_release(struct inode *, struct file *); |
302 | extern int nfs_attribute_timeout(struct inode *inode); | 305 | extern int nfs_attribute_timeout(struct inode *inode); |
@@ -579,6 +582,7 @@ extern void * nfs_root_data(void); | |||
579 | #define NFSDBG_FILE 0x0040 | 582 | #define NFSDBG_FILE 0x0040 |
580 | #define NFSDBG_ROOT 0x0080 | 583 | #define NFSDBG_ROOT 0x0080 |
581 | #define NFSDBG_CALLBACK 0x0100 | 584 | #define NFSDBG_CALLBACK 0x0100 |
585 | #define NFSDBG_CLIENT 0x0200 | ||
582 | #define NFSDBG_ALL 0xFFFF | 586 | #define NFSDBG_ALL 0xFFFF |
583 | 587 | ||
584 | #ifdef __KERNEL__ | 588 | #ifdef __KERNEL__ |