From: Jeff Layton Date: Wed, 24 Aug 2022 13:24:42 +0000 (-0400) Subject: ceph: increment i_version when doing a setattr with caps X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c79a6d94666bf79a5dbd68dc7faa8b815eba1ccf;p=ceph-client.git ceph: increment i_version when doing a setattr with caps When the client has enough caps to satisfy a setattr locally without having to talk to the server, we currently do the setattr without incrementing the change attribute. Ensure that if the ctime changes locally, then the change attribute does too. Signed-off-by: Jeff Layton Signed-off-by: Xiubo Li --- diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 2029953a1f1a..4db4394912e7 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -2451,6 +2451,7 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr, struct ceph_iattr *c inode_dirty_flags = __ceph_mark_dirty_caps(ci, dirtied, &prealloc_cf); inode->i_ctime = attr->ia_ctime; + inode_inc_iversion_raw(inode); } release &= issued;