]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: fix pool validation lockup
authorIlya Dryomov <idryomov@gmail.com>
Sat, 4 Sep 2021 10:59:07 +0000 (12:59 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 9 Sep 2021 13:33:02 +0000 (15:33 +0200)
commitb4060e13c07c9a0c7d055336251eee75f0477316
tree2793cda790992e1a787d45c610bec7e6201ae110
parent2cfd600a846afa70e2bde3c05374b04a384a23d5
librbd: fix pool validation lockup

Concurrent rbd_pool_init() or rbd_create() operations on an unvalidated
(uninitialized) pool trigger a lockup in ValidatePoolRequest state
machine caused by blocking selfmanaged_snap_{create,remove}() calls.
There are two reactor threads by default (librados_thread_count) but we
effectively need N + 1 reactor threads for N concurrent pool validation
requests, especially for small N.

Switch to aio_selfmanaged_snap_{create,remove}().  At the time this
code was initially written, these aio variants weren't available.  The
workqueue offload introduced later worked prior to the move to asio in
pacific.

Fixes: https://tracker.ceph.com/issues/52537
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 56d41a9ada8c673256fed2768b32a5a13ff10245)
src/librbd/image/ValidatePoolRequest.cc
src/test/librbd/test_librbd.cc