Skip to content

Commit f6973c0

Browse files
ukernelidryomov
authored andcommitted
ceph: use i_version to check validity of fscache
Signed-off-by: Yan, Zheng <[email protected]>
1 parent f7f7e7a commit f6973c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/ceph/cache.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "cache.h"
2626

2727
struct ceph_aux_inode {
28+
u64 version;
2829
struct timespec mtime;
2930
loff_t size;
3031
};
@@ -98,6 +99,7 @@ static uint16_t ceph_fscache_inode_get_aux(const void *cookie_netfs_data,
9899
const struct inode* inode = &ci->vfs_inode;
99100

100101
memset(&aux, 0, sizeof(aux));
102+
aux.version = ci->i_version;
101103
aux.mtime = inode->i_mtime;
102104
aux.size = i_size_read(inode);
103105

@@ -124,6 +126,7 @@ static enum fscache_checkaux ceph_fscache_inode_check_aux(
124126
return FSCACHE_CHECKAUX_OBSOLETE;
125127

126128
memset(&aux, 0, sizeof(aux));
129+
aux.version = ci->i_version;
127130
aux.mtime = inode->i_mtime;
128131
aux.size = i_size_read(inode);
129132

0 commit comments

Comments
 (0)