]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Wed, 8 Sep 2021 10:29:20 +0000 (12:29 +0200)
commit56d41a9ada8c673256fed2768b32a5a13ff10245
tree4f3f6b465dcd42f31823acf3c183af40808b0333
parentca906d0d7a65c8a598d397b764dd262cce645fe3
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>
src/librbd/image/ValidatePoolRequest.cc
src/test/librbd/test_librbd.cc