loop advertises REQ_NOWAIT support via BLK_FEAT_NOWAIT (set by default for all blk-mq devices), but delegates I/O processing to workqueues where blocking operations are allowed. Since REQ_NOWAIT is not valid in the workqueue context, clear the REQ_NOWAIT flag before handing the request over to the workqueue. This avoids unnecessary non-blocking constraints in a context where blocking is acceptable. Signed-off-by: Chaitanya Kulkarni --- Hi, Patches are generated on base commit in linux-block/for-next :- commit 6dbcc40ec7aa17ed3dd1f798e4201e75ab7d7447 (origin/for-next) Merge: 58625d626327 ba13710ddd1f Author: Jens Axboe Date: Wed Nov 5 18:24:17 2025 -0700 Merge branch 'for-6.19/block' into for-next * for-6.19/block: rust: block: update ARef and AlwaysRefCounted imports from sync::aref -ck --- drivers/block/loop.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 13ce229d450c..9d931ff456e7 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -797,6 +797,7 @@ static inline int queue_on_root_worker(struct cgroup_subsys_state *css) static void loop_queue_work(struct loop_device *lo, struct loop_cmd *cmd) { + struct request *rq = blk_mq_rq_from_pdu(cmd); struct rb_node **node, *parent = NULL; struct loop_worker *cur_worker, *worker = NULL; struct work_struct *work; @@ -860,6 +861,9 @@ static void loop_queue_work(struct loop_device *lo, struct loop_cmd *cmd) work = &lo->rootcg_work; cmd_list = &lo->rootcg_cmd_list; } + + rq->cmd_flags &= ~REQ_NOWAIT; + list_add_tail(&cmd->list_entry, cmd_list); queue_work(lo->workqueue, work); spin_unlock_irq(&lo->lo_work_lock); -- 2.40.0 zloop advertises REQ_NOWAIT support via BLK_FEAT_NOWAIT (set by default for all blk-mq devices), but delegates I/O processing to workqueues where blocking operations are allowed. Since REQ_NOWAIT is not valid in the workqueue context, clear the REQ_NOWAIT flag before handing the request over to the workqueue. This avoids unnecessary non-blocking constraints in a context where blocking is acceptable. Signed-off-by: Chaitanya Kulkarni --- drivers/block/zloop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/block/zloop.c b/drivers/block/zloop.c index 92be9f0af00a..22a245259622 100644 --- a/drivers/block/zloop.c +++ b/drivers/block/zloop.c @@ -620,6 +620,8 @@ static blk_status_t zloop_queue_rq(struct blk_mq_hw_ctx *hctx, blk_mq_start_request(rq); + rq->cmd_flags &= ~REQ_NOWAIT; + INIT_WORK(&cmd->work, zloop_cmd_workfn); queue_work(zlo->workqueue, &cmd->work); -- 2.40.0