public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Pankaj Raghav <p.raghav@samsung.com>
To: linux-block@vger.kernel.org, axboe@kernel.dk
Cc: damien.lemoal@opensource.wdc.com, gost.dev@samsung.com,
	Pankaj Raghav <p.raghav@samsung.com>
Subject: [PATCH 2/2] block: use blk_mq_plug() in blk_execute_rq_nowait()
Date: Sun, 25 Sep 2022 20:53:47 +0200	[thread overview]
Message-ID: <20220925185348.120964-3-p.raghav@samsung.com> (raw)
In-Reply-To: <20220925185348.120964-1-p.raghav@samsung.com>

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@kernel.dk/

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
 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);
-- 
2.25.1


  parent reply	other threads:[~2022-09-25 18:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220925185349eucas1p1dc689bac64668ca038ba8646c44fd580@eucas1p1.samsung.com>
2022-09-25 18:53 ` [PATCH 0/2] enable plugging only for reads in zoned block devices Pankaj Raghav
2022-09-25 18:53   ` [PATCH 1/2] block: modify blk_mq_plug() to allow only reads for " Pankaj Raghav
2022-09-25 22:55     ` Damien Le Moal
2022-09-26 14:37     ` Christoph Hellwig
2022-09-26 14:40       ` Jens Axboe
2022-09-26 14:43         ` Christoph Hellwig
2022-09-26 16:32           ` Jens Axboe
2022-09-26 19:20             ` Pankaj Raghav
2022-09-26 19:25               ` Jens Axboe
2022-09-27 15:20                 ` Pankaj Raghav
2022-09-27 16:04                   ` Jens Axboe
2022-09-27 16:51                     ` Christoph Hellwig
2022-09-27 16:52                       ` Jens Axboe
2022-09-27 23:07                         ` Damien Le Moal
2022-09-27 23:10                           ` Damien Le Moal
2022-09-27 23:13                             ` Jens Axboe
2022-09-27 23:12                           ` Jens Axboe
2022-09-27 23:35                             ` Damien Le Moal
2022-09-28 11:57                         ` Pankaj Raghav
2022-09-28 22:19                           ` Damien Le Moal
2022-09-25 18:53   ` Pankaj Raghav [this message]
2022-09-25 22:56     ` [PATCH 2/2] block: use blk_mq_plug() in blk_execute_rq_nowait() Damien Le Moal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220925185348.120964-3-p.raghav@samsung.com \
    --to=p.raghav@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=gost.dev@samsung.com \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox