dm-qcow2 is a request-based target: REQ_NOWAIT handling is done by blk-mq (tag allocation) before a request reaches us, and clone_and_map_rq() never blocks. Still, the target does not declare DM_TARGET_NOWAIT, so dm_table_set_restrictions() clears BLK_FEAT_NOWAIT on the mapped device and the block device file gets no FMODE_NOWAIT.
As a result io_uring cannot issue I/O in nowait mode and punts every request to an io-wq worker thread. Declare DM_TARGET_NOWAIT, so io_uring submits inline and saves a thread handoff per I/O. https://virtuozzo.atlassian.net/browse/VSTOR-95494 Feature: dm-qcow2: block device over QCOW2 files driver Signed-off-by: Andrey Zhadchenko <[email protected]> --- v2: moved after "process fast path qios in per-cpu batches on a workqueue"; measurements moved to the thread drivers/md/dm-qcow2-target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-qcow2-target.c b/drivers/md/dm-qcow2-target.c index 3e85de5c8b050..79a667d755f29 100644 --- a/drivers/md/dm-qcow2-target.c +++ b/drivers/md/dm-qcow2-target.c @@ -1171,7 +1171,7 @@ static void qcow2_resume(struct dm_target *ti) static struct target_type qcow2_target = { .name = "qcow2", .version = {1, 0, 0}, - .features = DM_TARGET_SINGLETON, + .features = DM_TARGET_SINGLETON | DM_TARGET_NOWAIT, .module = THIS_MODULE, .ctr = qcow2_ctr, .dtr = qcow2_dtr, -- 2.43.5 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
