]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
blk/kernel : Make bdev stop immediately
authorJaya Prakash <jayaprakash@ibm.com>
Mon, 10 Feb 2025 11:07:59 +0000 (16:37 +0530)
committerJaya Prakash <jayaprakash@ibm.com>
Mon, 10 Feb 2025 12:17:25 +0000 (17:47 +0530)
Fixes : https://tracker.ceph.com/issues/68881

Signed-off-by: Jaya Prakash <jayaprakash@ibm.com>
src/blk/kernel/KernelDevice.cc

index 72921e6d9f08bf2fa9317a0e78547ec1a581207c..3d55cc0ec9b56363771409661d711fa0d210791c 100644 (file)
@@ -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();
   }