On 6/21/22 01:11, Jan Kara wrote: > 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. > > Signed-off-by: Jan Kara <jack@xxxxxxx> > --- > block/blk-mq.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 67a7bfa58b7c..e17d822e6051 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -2825,6 +2825,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) > @@ -2836,8 +2838,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); Looks good to me. Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx> -- Damien Le Moal Western Digital Research