Re: [PATCH] ceph: increment i_version when doing a setattr with caps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 8/24/22 9:24 PM, Jeff Layton wrote:
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@xxxxxxxxxx>
---
  fs/ceph/inode.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index ccc926a7dcb0..65161296d449 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -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;

Good catch!

Merged into the testing branch.

Thanks!

-- Xiubo




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux