Skip to content

Commit

Permalink
ceph: increment i_version when doing a setattr with caps
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
Jeff Layton authored and Ilya Dryomov committed Oct 4, 2022
1 parent aa1d627 commit b4b924c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,7 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr)
inode_dirty_flags = __ceph_mark_dirty_caps(ci, dirtied,
&prealloc_cf);
inode->i_ctime = attr->ia_ctime;
inode_inc_iversion_raw(inode);
}

release &= issued;
Expand Down

0 comments on commit b4b924c

Please sign in to comment.