From: Jaya Prakash Date: Mon, 10 Feb 2025 11:07:59 +0000 (+0530) Subject: blk/kernel : Make bdev stop immediately X-Git-Tag: v20.0.0~165^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F60791%2Fhead;p=ceph.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 72921e6d9f08b..3d55cc0ec9b56 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(); }