]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds/quiesce: xlock the file to let clients keep their buffered writes
authorLeonid Usov <leonid.usov@ibm.com>
Mon, 8 Apr 2024 11:35:02 +0000 (14:35 +0300)
committerLeonid Usov <leonid.usov@ibm.com>
Sun, 21 Apr 2024 09:20:58 +0000 (12:20 +0300)
commit1f350a84cb1aebfed6f1eb8e806f16d9a0215c3d
treef545eb448d55fa0ccb36b5948ad8ff4f1e4c46b9
parent820a2f8ced66152ed3d765c31444b8076ea28c6b
mds/quiesce: xlock the file to let clients keep their buffered writes

With the quiesce protocol taking a `rdlock` on the file,
it also revokes the `Fb` capability, which the clients can't release
until they are done flushing, and that may take up arbitrarily long,
evidently, more than 10 minutes.

We went for the rdlock to avoid affecting readonly clients,
but given the evidence above we should not optimize for those.
Ideally, we’d like to have a QUIESCE file lock mode where both rd
and buffer are allowed, but as of now it seems like our best
available option is to `xlock` the file which will let the writing
clients keep their buffers for the duration of the quiesce.

We can only afford this change for a `splitauth` config,
i.e. where we drop the lock immediately after all `Fw`s are revoked

Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
(cherry picked from commit 8ac98428769cf45a8d43431ad0fbefe8cb953f06)
Fixes: https://tracker.ceph.com/issues/65556
Original-Issue: https://tracker.ceph.com/issues/65472
Original-PR: https://github.com/ceph/ceph/pull/56755
src/mds/MDCache.cc