]> 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>
Tue, 16 Apr 2024 05:43:56 +0000 (08:43 +0300)
commit8ac98428769cf45a8d43431ad0fbefe8cb953f06
tree237ce873e66cddca9094235c014cbb9145d0c141
parent7714874efb08facee80f92b358993fa56854bb01
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>
src/mds/MDCache.cc