diff options
author | Chengming Zhou <zhouchengming@bytedance.com> | 2023-09-13 17:16:15 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-09-22 16:52:13 +0200 |
commit | 217b613a53d3a430aa2e5d1523819dc271f02ff0 (patch) | |
tree | 0f5fd4caece6578b8981ff613110f75034892498 /block/blk-mq.c | |
parent | blk-mq: support batched queue_rqs() on shared tags queue (diff) | |
download | linux-217b613a53d3a430aa2e5d1523819dc271f02ff0.tar.xz linux-217b613a53d3a430aa2e5d1523819dc271f02ff0.zip |
blk-mq: update driver tags request table when start request
Now we update driver tags request table in blk_mq_get_driver_tag(),
so the driver that support queue_rqs() have to update that inflight
table by itself.
Move it to blk_mq_start_request(), which is a better place where
we setup the deadline for request timeout check. And it's just
where the request becomes inflight.
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230913151616.3164338-5-chengming.zhou@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 68ce9357463b..e2d11183f62e 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1259,6 +1259,7 @@ void blk_mq_start_request(struct request *rq) blk_add_timer(rq); WRITE_ONCE(rq->state, MQ_RQ_IN_FLIGHT); + rq->mq_hctx->tags->rqs[rq->tag] = rq; #ifdef CONFIG_BLK_DEV_INTEGRITY if (blk_integrity_rq(rq) && req_op(rq) == REQ_OP_WRITE) |