diff options
author | Jan Kara <jack@suse.cz> | 2022-06-23 09:48:33 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-06-27 14:29:12 +0200 |
commit | 9c6227e04355a430aa59709bbf869d9126112d0d (patch) | |
tree | 4234be3cf232828ed00ea23efb00c788010c0137 /block/blk-mq.c | |
parent | blk-ioprio: Convert from rqos policy to direct call (diff) | |
download | linux-9c6227e04355a430aa59709bbf869d9126112d0d.tar.xz linux-9c6227e04355a430aa59709bbf869d9126112d0d.zip |
block: Initialize bio priority earlier
Bio's IO priority needs to be initialized before we try to merge the bio
with other bios. Otherwise we could merge bios which would otherwise
receive different IO priorities leading to possible QoS issues.
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220623074840.5960-8-jack@suse.cz
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 4c4944b6f520..c0ec1938feee 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2814,6 +2814,8 @@ void blk_mq_submit_bio(struct bio *bio) if (!bio_integrity_prep(bio)) return; + bio_set_ioprio(bio); + rq = blk_mq_get_cached_request(q, plug, &bio, nr_segs); if (!rq) { if (!bio) @@ -2825,8 +2827,6 @@ void blk_mq_submit_bio(struct bio *bio) trace_block_getrq(bio); - bio_set_ioprio(bio); - rq_qos_track(q, rq, bio); blk_mq_bio_to_request(rq, bio, nr_segs); |