ceph: voluntarily drop Xx caps for requests those touch parent mtime
authorXiubo Li <xiubli@redhat.com>
Mon, 5 Jun 2023 06:58:18 +0000 (14:58 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 30 Jun 2023 10:08:55 +0000 (12:08 +0200)
commitd9d00f71ab5a2b5a47b228f678a8817e8687387f
tree0df3b8e964d0b439ab0bee57267d3051597c387f
parent8b0da5c549ae63ba1debd92a350f90773cb4bfe7
ceph: voluntarily drop Xx caps for requests those touch parent mtime

For write requests the parent's mtime will be updated correspondingly.
And if the 'Xx' caps is issued and when releasing other caps together
with the write requests the MDS Locker will try to eval the xattr lock,
which need to change the locker state excl --> sync and need to do Xx
caps revocation.

Just voluntarily dropping CEPH_CAP_XATTR_EXCL caps to avoid a cap
revoke message, which could cause the mtime will be overwrote by stale
one.

[ idryomov: break unnecessarily long lines ]

Link: https://tracker.ceph.com/issues/61584
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/dir.c
fs/ceph/file.c