From: Jaya Prakash Date: Mon, 10 Feb 2025 11:07:59 +0000 (+0530) Subject: blk/kernel : Make bdev stop immediately X-Git-Tag: testing/wip-pdonnell-testing-20250214.031850-debug~7^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2848244e73f1ade353c438567cd3abf8a6e967bc;p=ceph-ci.git blk/kernel : Make bdev stop immediately Fixes : https://tracker.ceph.com/issues/68881 Signed-off-by: Jaya Prakash --- diff --git a/src/blk/kernel/KernelDevice.cc b/src/blk/kernel/KernelDevice.cc index 72921e6d9f0..3d55cc0ec9b 100644 --- a/src/blk/kernel/KernelDevice.cc +++ b/src/blk/kernel/KernelDevice.cc @@ -541,7 +541,20 @@ void KernelDevice::_aio_stop() if (aio) { dout(10) << __func__ << dendl; aio_stop = true; + + IOContext wakeup_ctx(cct, nullptr, false); + bufferlist bl; + aio_read(0, block_size, &bl, &wakeup_ctx); + aio_submit(&wakeup_ctx); + aio_thread.join(); + + if (cct->_conf->bdev_debug_aio) { + for (auto& i: wakeup_ctx.running_aios) { + debug_aio_unlink(i); + } + } + aio_stop = false; io_queue->shutdown(); }