]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: set the correct WRLOCK flag always in wrlock_force()
authorXiubo Li <xiubli@redhat.com>
Thu, 25 Apr 2024 04:06:25 +0000 (12:06 +0800)
committerJos Collin <jcollin@redhat.com>
Wed, 10 Jul 2024 04:30:57 +0000 (10:00 +0530)
commitdeb35541517c94b80f0991a39faa9fd4fe4fb363
tree45cc0360cd2d37cea0bdfda916a4670fe9841f28
parent8f1c89d08190b8da08bc562af8deff78617e787a
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