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

os/bluestore: fix deferred write deadlock, aio short return handling #17601

Merged
merged 3 commits into from Sep 10, 2017

Commits on Sep 8, 2017

  1. os/bluestore: drop deferred_submit_lock

    This lock serves no purpose.  It only protects the call to the aio_submit
    on the OpSequencer running batch, but we are the only caller who will do
    that submission, and a new batch won't be moved into place until ours is
    completed and retired (by the completion for the aio we are queueing).
    
    More importantly, this fixes a deadlock:
    
    - thread A submits aio, but the queue is full, and blocks
    - thread B blocks taking deferred_submit_lock while holding deferred_lock
    - aio completion thread blocks trying to take deferred_lock, and thus
    no further aios are drained.
    
    Fixes: http://tracker.ceph.com/issues/21171
    Signed-off-by: Sage Weil <sage@redhat.com>
    (cherry picked from commit 7a5ef62)
    liewegas committed Sep 8, 2017
    Configuration menu
    Copy the full SHA
    e9b89c8 View commit details
    Browse the repository at this point in the history
  2. os/bluestore: more deferred debugging

    Signed-off-by: Sage Weil <sage@redhat.com>
    (cherry picked from commit 11ac691)
    liewegas committed Sep 8, 2017
    Configuration menu
    Copy the full SHA
    accd582 View commit details
    Browse the repository at this point in the history
  3. os/bluestore/aio: handle short return from io_submit

    io_submit may return a value less than nr, indicating that only some of
    the provided iocbs were queued.  If that happens we should loop, not
    return and silently drop those aios on the floor.
    
    Signed-off-by: Sage Weil <sage@redhat.com>
    (cherry picked from commit dc17dfd)
    liewegas committed Sep 8, 2017
    Configuration menu
    Copy the full SHA
    a32f6a2 View commit details
    Browse the repository at this point in the history