On 9/26/22 03:53, Pankaj Raghav wrote:
blk_execute_rq_nowait() function mainly was used by low-level drivers
such as NVMe to submit one-off passthrough requests. However, recently
introduced uring-cmd based io-passthrough also uses the same function to
submit io requests.
As the plugging support is coming to io-passthrough[1], use the
blk_mq_plug() helper to ensure plugging is not used in all scenarios.
[1]
https://lore.kernel.org/linux-block/20220922182805.96173-1-axboe@xxxxxxxxx/
Signed-off-by: Pankaj Raghav <p.raghav@xxxxxxxxxxx>
---
block/blk-mq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index c11949d66163..840541c1ab40 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1213,7 +1213,7 @@ void blk_execute_rq_nowait(struct request *rq, bool at_head)
WARN_ON(!blk_rq_is_passthrough(rq));
blk_account_io_start(rq);
- if (current->plug)
+ if (blk_mq_plug(rq->bio))
blk_add_rq_to_plug(current->plug, rq);
else
blk_mq_sched_insert_request(rq, at_head, true, false);
Looks good to me.
Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
--
Damien Le Moal
Western Digital Research