]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
squid: mds/quiesce: quiesce_inode should not hold on to remote auth pins
authorLeonid Usov <leonid.usov@ibm.com>
Mon, 20 May 2024 22:03:15 +0000 (01:03 +0300)
committerLeonid Usov <leonid.usov@ibm.com>
Tue, 28 May 2024 19:00:29 +0000 (22:00 +0300)
commit92eab9e5906b84b0ad0a7abb7e19b60f6b584cf1
treed5bd1b06e3eaec3bc09d23527299c4cb133796f1
parent80f79ed753ffe030e00202b8ef1a3caa563f625f
squid: mds/quiesce: quiesce_inode should not hold on to remote auth pins

1. avoid taking a remote authpin for the quiesce lock
2. drop remote authpins that were taken because of other locks

We should not be forcing a mustpin when taking quiesce lock.
This creates unnecessary overhead due to the distributed nature
of the quiesce: all ranks will execute quiesce_inode, including
the auth rank, which will authpin the inode.

Auth pinning on the auth rank is important to synchronize quiesce
with operations that are managed by the auth, like fragmenting
and exporting.

If we let a remote quiesce process take a foreign authpin then
it may block freezing on the auth, which will stall quiesce locally.
This wouldn't be a problem if the quiesce that is blocked on the auth
and the quiesce that's holding a remote authpin from the replica side
were unrelated, but in our case it may be the same logical quiesce
that effectively steps on its own toes. This creates an opportunity
for a deadlock.

Fixes: https://tracker.ceph.com/issues/66152
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
(cherry picked from commit b1cb6d985622c6164d99d3fd79b6eeaf6530894c)
Fixes: https://tracker.ceph.com/issues/66258
qa/tasks/cephfs/test_quiesce.py
src/mds/Locker.cc
src/mds/Locker.h
src/mds/MDCache.cc
src/mds/Server.cc