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

ZIL: Fix config lock deadlock. #15080

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Commits on Jul 24, 2023

  1. ZIL: Fix config lock deadlock.

    When we have some LWBs closed and their ZIOs ready to be issued, we
    can not afford sleeping on config lock if somebody else try to lock
    it as writer, or it will cause a deadlock.
    
    To solve it, move spa_config_enter() from zil_lwb_write_issue() to
    zil_lwb_write_close() under zl_issuer_lock to enforce lock ordering
    with other threads.  Now if we can't immediately lock config, issue
    all previously closed LWBs so that they could drop their config
    locks after completion, and only then allow sleeping on our lock.
    
    Signed-off-by:  Alexander Motin <[email protected]>
    Sponsored by:   iXsystems, Inc.
    Issue openzfs#15078
    amotin committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    29ff88b View commit details
    Browse the repository at this point in the history