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

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

Merged
merged 2 commits into from
Apr 17, 2024

Commits on Apr 16, 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>
    leonid-s-usov committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    8ac9842 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>
    leonid-s-usov committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    eac482b View commit details
    Browse the repository at this point in the history