aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-07-25 11:28:18 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:28 -0400
commit1c3c07e9f6cc50dab2aeb8051325e317d4f6c70e (patch)
tree96bbc2a304e9a0e831daf589d1662c6129303796 /include/linux/nfs_fs.h
parent3eeab61aa3ddd3c0bedb7449ada1599de22fdb5a (diff)
NFS: Add a new ACCESS rpc call cache to the linux nfs client
The current access cache only allows one entry at a time to be cached for each inode. Add a per-inode red-black tree in order to allow more than one to be cached at a time. Should significantly cut down the time spent in path traversal for shared directories such as ${PATH}, /usr/share, etc. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r--include/linux/nfs_fs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 6c2066caeaab..cc013ed2e52e 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,7 @@
69 * NFSv3/v4 Access mode cache entry 70 * NFSv3/v4 Access mode cache entry
70 */ 71 */
71struct nfs_access_entry { 72struct nfs_access_entry {
73 struct rb_node rb_node;
72 unsigned long jiffies; 74 unsigned long jiffies;
73 struct rpc_cred * cred; 75 struct rpc_cred * cred;
74 int mask; 76 int mask;
@@ -145,7 +147,7 @@ struct nfs_inode {
145 */ 147 */
146 atomic_t data_updates; 148 atomic_t data_updates;
147 149
148 struct nfs_access_entry cache_access; 150 struct rb_root access_cache;
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;
@@ -297,6 +299,7 @@ extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
297extern int nfs_permission(struct inode *, int, struct nameidata *); 299extern int nfs_permission(struct inode *, int, struct nameidata *);
298extern int nfs_access_get_cached(struct inode *, struct rpc_cred *, struct nfs_access_entry *); 300extern int nfs_access_get_cached(struct inode *, struct rpc_cred *, struct nfs_access_entry *);
299extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *); 301extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *);
302extern void nfs_access_zap_cache(struct inode *inode);
300extern int nfs_open(struct inode *, struct file *); 303extern int nfs_open(struct inode *, struct file *);
301extern int nfs_release(struct inode *, struct file *); 304extern int nfs_release(struct inode *, struct file *);
302extern int nfs_attribute_timeout(struct inode *inode); 305extern int nfs_attribute_timeout(struct inode *inode);