From 9451a9a52f91a4c171cfaca2f6d7a2ce91867b8d Mon Sep 17 00:00:00 2001 From: Suresh Jayaraman Date: Mon, 5 Jul 2010 18:12:45 +0530 Subject: cifs: define inode-level cache object and register them Define inode-level data storage objects (managed by cifsInodeInfo structs). Each inode-level object is created in a super-block level object and is itself a data storage object in to which pages from the inode are stored. The inode object is keyed by UniqueId. The coherency data being used is LastWriteTime, LastChangeTime and end of file reported by the server. Signed-off-by: Suresh Jayaraman Signed-off-by: Steve French --- fs/cifs/inode.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs/cifs/inode.c') diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index f884cb51622a..5a68b92a0f9a 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -29,6 +29,7 @@ #include "cifsproto.h" #include "cifs_debug.h" #include "cifs_fs_sb.h" +#include "fscache.h" static void cifs_set_ops(struct inode *inode, const bool is_dfs_referral) @@ -776,6 +777,8 @@ retry_iget5_locked: inode->i_flags |= S_NOATIME | S_NOCMTIME; if (inode->i_state & I_NEW) { inode->i_ino = hash; + /* initialize per-inode cache cookie pointer */ + CIFS_I(inode)->fscache = NULL; unlock_new_inode(inode); } } @@ -1571,6 +1574,7 @@ cifs_invalidate_mapping(struct inode *inode) cifs_i->write_behind_rc = rc; } invalidate_remote_inode(inode); + cifs_fscache_reset_inode_cookie(inode); } int cifs_revalidate_file(struct file *filp) -- cgit v1.2.2