Skip to content

Commit 3008ab4

Browse files
Merge pull request ceph#60791 from Jayaprakash-ibm/jaya-branch
blk/kernel : Make bdev stop immediately Reviewed-by : Adam Kupczyk <[email protected]> Reviewed-by : Igor Fedotov <[email protected]>
2 parents 2a6ba87 + 2848244 commit 3008ab4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/blk/kernel/KernelDevice.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,20 @@ void KernelDevice::_aio_stop()
541541
if (aio) {
542542
dout(10) << __func__ << dendl;
543543
aio_stop = true;
544+
545+
IOContext wakeup_ctx(cct, nullptr, false);
546+
bufferlist bl;
547+
aio_read(0, block_size, &bl, &wakeup_ctx);
548+
aio_submit(&wakeup_ctx);
549+
544550
aio_thread.join();
551+
552+
if (cct->_conf->bdev_debug_aio) {
553+
for (auto& i: wakeup_ctx.running_aios) {
554+
debug_aio_unlink(i);
555+
}
556+
}
557+
545558
aio_stop = false;
546559
io_queue->shutdown();
547560
}

0 commit comments

Comments
 (0)