summaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorTrond Myklebust2006-07-25 17:28:19 +0200
committerTrond Myklebust2006-09-23 05:24:29 +0200
commit979df72e6f963b42ee484f2eca049c3344da0ba7 (patch)
treef3ba48a16203c899dbe57482c1ff7f1c02e0c9ca /fs/nfs/internal.h
parentNFS: Add a global LRU list for the ACCESS cache (diff)
downloadkernel-qcow2-linux-979df72e6f963b42ee484f2eca049c3344da0ba7.tar.gz
kernel-qcow2-linux-979df72e6f963b42ee484f2eca049c3344da0ba7.tar.xz
kernel-qcow2-linux-979df72e6f963b42ee484f2eca049c3344da0ba7.zip
NFS: Add an ACCESS cache memory shrinker
A pinned inode may in theory end up filling memory with cached ACCESS calls. This patch ensures that the VM may shrink away the cache in these particular cases. The shrinker works by iterating through the list of inodes on the global nfs_access_lru_list, and removing the least recently used access cache entry until it is done (or until the entire cache is empty). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index e4f4e5def0fc..660e9ff5341c 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -66,6 +66,9 @@ extern int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry,
struct page *page);
#endif
+/* dir.c */
+extern int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask);
+
/* inode.c */
extern struct inode *nfs_alloc_inode(struct super_block *sb);
extern void nfs_destroy_inode(struct inode *);