]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: drop deferred_submit_lock
authorSage Weil <sage@redhat.com>
Tue, 29 Aug 2017 20:15:52 +0000 (16:15 -0400)
committerSage Weil <sage@redhat.com>
Fri, 8 Sep 2017 12:17:26 +0000 (08:17 -0400)
commite9b89c8b011fbbeeb128553b1b12708155a52628
treeab38b8cb96323539bd69d432ecd2134521abed8e
parent0fd1035a6f280ebd38e6aabc925afb3d49fd53ea
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 7a5ef62af194373c3a8c307b05ae6d467e49c9f0)
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h