diff options
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r-- | include/linux/nfs_fs.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 6c2066caeaab..3b5b04193fee 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/in.h> | 42 | #include <linux/in.h> |
43 | #include <linux/mm.h> | 43 | #include <linux/mm.h> |
44 | #include <linux/pagemap.h> | 44 | #include <linux/pagemap.h> |
45 | #include <linux/rbtree.h> | ||
45 | #include <linux/rwsem.h> | 46 | #include <linux/rwsem.h> |
46 | #include <linux/wait.h> | 47 | #include <linux/wait.h> |
47 | 48 | ||
@@ -69,6 +70,8 @@ | |||
69 | * NFSv3/v4 Access mode cache entry | 70 | * NFSv3/v4 Access mode cache entry |
70 | */ | 71 | */ |
71 | struct nfs_access_entry { | 72 | struct nfs_access_entry { |
73 | struct rb_node rb_node; | ||
74 | struct list_head lru; | ||
72 | unsigned long jiffies; | 75 | unsigned long jiffies; |
73 | struct rpc_cred * cred; | 76 | struct rpc_cred * cred; |
74 | int mask; | 77 | int mask; |
@@ -145,7 +148,9 @@ struct nfs_inode { | |||
145 | */ | 148 | */ |
146 | atomic_t data_updates; | 149 | atomic_t data_updates; |
147 | 150 | ||
148 | struct nfs_access_entry cache_access; | 151 | struct rb_root access_cache; |
152 | struct list_head access_cache_entry_lru; | ||
153 | struct list_head access_cache_inode_lru; | ||
149 | #ifdef CONFIG_NFS_V3_ACL | 154 | #ifdef CONFIG_NFS_V3_ACL |
150 | struct posix_acl *acl_access; | 155 | struct posix_acl *acl_access; |
151 | struct posix_acl *acl_default; | 156 | struct posix_acl *acl_default; |
@@ -199,6 +204,7 @@ struct nfs_inode { | |||
199 | #define NFS_INO_REVALIDATING (0) /* revalidating attrs */ | 204 | #define NFS_INO_REVALIDATING (0) /* revalidating attrs */ |
200 | #define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ | 205 | #define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ |
201 | #define NFS_INO_STALE (2) /* possible stale inode */ | 206 | #define NFS_INO_STALE (2) /* possible stale inode */ |
207 | #define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */ | ||
202 | 208 | ||
203 | static inline struct nfs_inode *NFS_I(struct inode *inode) | 209 | static inline struct nfs_inode *NFS_I(struct inode *inode) |
204 | { | 210 | { |
@@ -209,8 +215,7 @@ static inline struct nfs_inode *NFS_I(struct inode *inode) | |||
209 | #define NFS_FH(inode) (&NFS_I(inode)->fh) | 215 | #define NFS_FH(inode) (&NFS_I(inode)->fh) |
210 | #define NFS_SERVER(inode) (NFS_SB(inode->i_sb)) | 216 | #define NFS_SERVER(inode) (NFS_SB(inode->i_sb)) |
211 | #define NFS_CLIENT(inode) (NFS_SERVER(inode)->client) | 217 | #define NFS_CLIENT(inode) (NFS_SERVER(inode)->client) |
212 | #define NFS_PROTO(inode) (NFS_SERVER(inode)->rpc_ops) | 218 | #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) | 219 | #define NFS_COOKIEVERF(inode) (NFS_I(inode)->cookieverf) |
215 | #define NFS_READTIME(inode) (NFS_I(inode)->read_cache_jiffies) | 220 | #define NFS_READTIME(inode) (NFS_I(inode)->read_cache_jiffies) |
216 | #define NFS_CHANGE_ATTR(inode) (NFS_I(inode)->change_attr) | 221 | #define NFS_CHANGE_ATTR(inode) (NFS_I(inode)->change_attr) |
@@ -297,6 +302,7 @@ extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | |||
297 | extern int nfs_permission(struct inode *, int, struct nameidata *); | 302 | 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 *); | 303 | 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 *); | 304 | extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *); |
305 | extern void nfs_access_zap_cache(struct inode *inode); | ||
300 | extern int nfs_open(struct inode *, struct file *); | 306 | extern int nfs_open(struct inode *, struct file *); |
301 | extern int nfs_release(struct inode *, struct file *); | 307 | extern int nfs_release(struct inode *, struct file *); |
302 | extern int nfs_attribute_timeout(struct inode *inode); | 308 | extern int nfs_attribute_timeout(struct inode *inode); |
@@ -579,6 +585,7 @@ extern void * nfs_root_data(void); | |||
579 | #define NFSDBG_FILE 0x0040 | 585 | #define NFSDBG_FILE 0x0040 |
580 | #define NFSDBG_ROOT 0x0080 | 586 | #define NFSDBG_ROOT 0x0080 |
581 | #define NFSDBG_CALLBACK 0x0100 | 587 | #define NFSDBG_CALLBACK 0x0100 |
588 | #define NFSDBG_CLIENT 0x0200 | ||
582 | #define NFSDBG_ALL 0xFFFF | 589 | #define NFSDBG_ALL 0xFFFF |
583 | 590 | ||
584 | #ifdef __KERNEL__ | 591 | #ifdef __KERNEL__ |