]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
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>
Sun, 26 May 2024 08:33:52 +0000 (11:33 +0300)
commitb1cb6d985622c6164d99d3fd79b6eeaf6530894c
tree174ad2883a173524297d2b3f74787f8e21cc278c
parente32fb12b8ea105cef82cf5b9304c28bc4dc8e7a5
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>
qa/tasks/cephfs/test_quiesce.py
src/mds/Locker.cc
src/mds/Locker.h
src/mds/MDCache.cc
src/mds/Server.cc