summaryrefslogtreecommitdiff
path: root/fs/ceph/cache.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-05-20 16:57:29 +0800
committerIlya Dryomov <idryomov@gmail.com>2016-06-01 10:32:14 +0200
commitf6973c09490c919398fc87d9c6bec9c0b670c4c4 (patch)
tree4061025b3d42d10f0b4f6b07c9113ca8f9e8f3ee /fs/ceph/cache.c
parentf7f7e7a0635dedd5064fba255cb3facfa87b06d6 (diff)
ceph: use i_version to check validity of fscache
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/cache.c')
-rw-r--r--fs/ceph/cache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/cache.c b/fs/ceph/cache.c
index 5b3f4828f214..238c55b01723 100644
--- a/fs/ceph/cache.c
+++ b/fs/ceph/cache.c
@@ -25,6 +25,7 @@
#include "cache.h"
struct ceph_aux_inode {
+ u64 version;
struct timespec mtime;
loff_t size;
};
@@ -98,6 +99,7 @@ static uint16_t ceph_fscache_inode_get_aux(const void *cookie_netfs_data,
const struct inode* inode = &ci->vfs_inode;
memset(&aux, 0, sizeof(aux));
+ aux.version = ci->i_version;
aux.mtime = inode->i_mtime;
aux.size = i_size_read(inode);
@@ -124,6 +126,7 @@ static enum fscache_checkaux ceph_fscache_inode_check_aux(
return FSCACHE_CHECKAUX_OBSOLETE;
memset(&aux, 0, sizeof(aux));
+ aux.version = ci->i_version;
aux.mtime = inode->i_mtime;
aux.size = i_size_read(inode);