]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: set the correct WRLOCK flag always in wrlock_force() 58773/head
authorXiubo Li <xiubli@redhat.com>
Thu, 25 Apr 2024 04:06:25 +0000 (12:06 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 24 Jul 2024 02:54:43 +0000 (10:54 +0800)
commit5280cbe7d6dbb97efb13fb755662e484a35d497c
treed13b0df84e73bd16f7c2d404e6b43c5e62b7f3a7
parentbc3f96b4d8985987fafad1495e023562ad9e61c1
mds: set the correct WRLOCK flag always in wrlock_force()

The wrlock is not like the xlock, which needs to be acquired in
the CInode's auth always, and it is based on the CDir's auths instead.

When a remote_wrlock is acquired and the local MDS will add a lock
item and marks it as REMOTE_WRLOCK. And later when the local MDS try
to force wrlock in the emplace_lock() will just return the existing
lock item without updating the WRLOCK flag. So when cleaning the
requests later it will just release the remote locks and then removes
lock items directly, which will miss releasing the local wrlock
reference.

Fixes: https://tracker.ceph.com/issues/65630
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 9a6f249b96faed085a7dea251b0fd81a28330025)
src/mds/Locker.cc