aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2005-06-22 13:16:27 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 16:07:25 -0400
commit5c6a9f7d92291c832d47e792ed1fafa44acb066e (patch)
treec67e62e0b46c22b061d5eb2b28ef702bdf2afa0d /include/linux
parent055ffbea0596942579b0dae71d5dab78de8135f6 (diff)
[PATCH] NFS: Cache the NFSv3 acls.
Attach acls to inodes in the icache to avoid unnecessary GETACL RPC round-trips. As long as the client doesn't retrieve any acls itself, only the default acls of exiting directories and the default and access acls of new directories will end up in the cache, which preserves some memory compared to always caching the access and default acl of all files. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Acked-by: Olaf Kirch <okir@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nfs_fs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 7662c5131b47..4ceac9ddac93 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -91,6 +91,8 @@ struct nfs_open_context {
91 */ 91 */
92struct nfs_delegation; 92struct nfs_delegation;
93 93
94struct posix_acl;
95
94/* 96/*
95 * nfs fs inode data in memory 97 * nfs fs inode data in memory
96 */ 98 */
@@ -144,6 +146,10 @@ struct nfs_inode {
144 atomic_t data_updates; 146 atomic_t data_updates;
145 147
146 struct nfs_access_entry cache_access; 148 struct nfs_access_entry cache_access;
149#ifdef CONFIG_NFS_V3_ACL
150 struct posix_acl *acl_access;
151 struct posix_acl *acl_default;
152#endif
147 153
148 /* 154 /*
149 * This is the cookie verifier used for NFSv3 readdir 155 * This is the cookie verifier used for NFSv3 readdir
@@ -480,6 +486,7 @@ extern int nfs3_proc_setacl(struct inode *inode, int type,
480 struct posix_acl *acl); 486 struct posix_acl *acl);
481extern int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode, 487extern int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode,
482 mode_t mode); 488 mode_t mode);
489extern void nfs3_forget_cached_acls(struct inode *inode);
483#else 490#else
484static inline int nfs3_proc_set_default_acl(struct inode *dir, 491static inline int nfs3_proc_set_default_acl(struct inode *dir,
485 struct inode *inode, 492 struct inode *inode,
@@ -487,6 +494,10 @@ static inline int nfs3_proc_set_default_acl(struct inode *dir,
487{ 494{
488 return 0; 495 return 0;
489} 496}
497
498static inline void nfs3_forget_cached_acls(struct inode *inode)
499{
500}
490#endif /* CONFIG_NFS_V3_ACL */ 501#endif /* CONFIG_NFS_V3_ACL */
491 502
492/* 503/*