From 10329a5d48f5abc14a37d30b706e330f8598297a Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 3 Apr 2009 16:42:43 +0100 Subject: NFS: Define and create inode-level cache objects Define and create inode-level cache data storage objects (as managed by nfs_inode structs). Each inode-level object is created in a superblock-level index object and is itself a data storage object into which pages from the inode are stored. The inode object key is the NFS file handle for the inode. The inode object is given coherency data to carry in the auxiliary data permitted by the cache. This is a sequence made up of: (1) i_mtime from the NFS inode. (2) i_ctime from the NFS inode. (3) i_size from the NFS inode. (4) change_attr from the NFSv4 attribute data. As the cache is a persistent cache, the auxiliary data is checked when a new NFS in-memory inode is set up that matches an already existing data storage object in the cache. If the coherency data is the same, the on-disk object is retained and used; if not, it is scrapped and a new one created. Signed-off-by: David Howells Acked-by: Steve Dickson Acked-by: Trond Myklebust Acked-by: Al Viro Tested-by: Daire Byrne --- fs/nfs/fscache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/nfs/fscache.h') diff --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h index 22b971e8b38..d21b5906ccf 100644 --- a/fs/nfs/fscache.h +++ b/fs/nfs/fscache.h @@ -62,6 +62,7 @@ struct nfs_fscache_key { extern struct fscache_netfs nfs_fscache_netfs; extern const struct fscache_cookie_def nfs_fscache_server_index_def; extern const struct fscache_cookie_def nfs_fscache_super_index_def; +extern const struct fscache_cookie_def nfs_fscache_inode_object_def; extern int nfs_fscache_register(void); extern void nfs_fscache_unregister(void); -- cgit v1.2.3