summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorPankaj Raghav <p.raghav@samsung.com>2022-09-29 17:41:41 +0300
committerJens Axboe <axboe@kernel.dk>2022-09-29 18:02:49 +0300
commit110fdb4486d3a5e67d55bc6866d6426e6d49ccfc (patch)
treee52fbc5b96f7f3922a4b0c8d00bcf6da8f176613 /block/blk-mq.c
parent8cafdb5ab94cda3ebb0975be16e2d564a05132ea (diff)
downloadlinux-110fdb4486d3a5e67d55bc6866d6426e6d49ccfc.tar.xz
block: add rationale for not using blk_mq_plug() when applicable
There are two places in the block layer at the moment where blk_mq_plug() helper could be used instead of directly accessing the plug from struct current. In both these cases, directly accessing the plug should not have any consequences for zoned devices. Make the intent explicit by adding comments instead of introducing unwanted checks with blk_mq_plug() helper.[1] [1] https://lore.kernel.org/linux-block/f6e54907-1035-2b2c-6387-ed178be05ccb@kernel.dk/ Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> Suggested-by: Jens Axboe <axboe@kernel.dk> Link: https://lore.kernel.org/r/20220929144141.140077-1-p.raghav@samsung.com [axboe: fixup multi-line comment style] Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index b2b318df4f69..9dd3ec42613f 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1215,6 +1215,12 @@ void blk_execute_rq_nowait(struct request *rq, bool at_head)
WARN_ON(!blk_rq_is_passthrough(rq));
blk_account_io_start(rq);
+
+ /*
+ * As plugging can be enabled for passthrough requests on a zoned
+ * device, directly accessing the plug instead of using blk_mq_plug()
+ * should not have any consequences.
+ */
if (current->plug)
blk_add_rq_to_plug(current->plug, rq);
else