]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
ceph: increment i_version when doing a setattr with caps
authorJeff Layton <jlayton@kernel.org>
Wed, 24 Aug 2022 13:24:42 +0000 (09:24 -0400)
committerXiubo Li <xiubli@redhat.com>
Fri, 26 Aug 2022 23:51:58 +0000 (07:51 +0800)
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 <jlayton@kernel.org>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
fs/ceph/inode.c

index 2029953a1f1a7e15adf47c7653857b973fa1d2a4..4db4394912e799d17fec4b7876a462a231b72e50 100644 (file)
@@ -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;