Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

squid: mds/quiesce: let clients keep their buffered writes for a quiesced file #57013

Merged
merged 2 commits into from
May 22, 2024

Commits on Apr 21, 2024

  1. 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 8ac9842)
    Fixes: https://tracker.ceph.com/issues/65556
    Original-Issue: https://tracker.ceph.com/issues/65472
    Original-PR: #56755
    leonid-s-usov committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    1f350a8 View commit details
    Browse the repository at this point in the history
  2. mds/quiesce: don't take mirrored cap-related locks on the replica

    For every mirrored lock, the auth will message the replica to ensure
    the replicated lock state. When we take x/rdlock on the auth, it will
    ensure the LOCK_LOCK state on the replica, which has the file caps we
    want for quiesce: CACHE and BUFFER.
    
    It should be sufficient to only hold the quiesce local lock
    on the replica side.
    
    Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
    (cherry picked from commit eac482b)
    Fixes: https://tracker.ceph.com/issues/65556
    Original-Issue: https://tracker.ceph.com/issues/65472
    Original-PR: #56755
    leonid-s-usov committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    bb8b0bf View commit details
    Browse the repository at this point in the history