UPSTREAM: block/mq-deadline: Set the fifo_time member also if inserting at head

Before commit 322cff70d46c the fifo_time member of requests on a dispatch
list was not used. Commit 322cff70d46c introduces code that reads the
fifo_time member of requests on dispatch lists. Hence this patch that sets
the fifo_time member when adding a request to a dispatch list.

Bug: 293845137
(cherry picked from commit 725f22a1477c9c15aa67ad3af96fe28ec4fe72d2)
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Fixes: 322cff70d46c ("block/mq-deadline: Prioritize high-priority requests")
Change-Id: I2e47e7e7afd80f661703d7d3e319bf781d7f90e5
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20220513171307.32564-1-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Yunlong Xing <Yunlong.Xing@unisoc.com>
Signed-off-by: Xiuhong Wang <Xiuhong.Wang@unisoc.com>
This commit is contained in:
Bart Van Assche
2022-05-13 10:13:07 -07:00
committed by Daniel Rosenberg
parent fcc3046236
commit dac9a9b19c

View File

@@ -801,6 +801,7 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
if (at_head) {
list_add(&rq->queuelist, &per_prio->dispatch);
rq->fifo_time = jiffies;
} else {
deadline_add_rq_rb(per_prio, rq);