From 0db9f8968a8941d4fc9fddf220d4983d9b68deaf Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Wed, 28 Oct 2026 10:41:34 -0600 Subject: [PATCH] blk-mq: don't forget a timer the driver has restarted If ->timeout() returns BLK_EH_RESET_TIMER, blk_add_timer() gives the request a new deadline that blk_mq_timeout_work() doesn't know about when it picks the next expiry. A 2s nbd read next to a 60s one expires once and then not again for a minute. Let the new deadline take part. Fixes: 320ae51feed5 ("blk-mq: new multi-queue block IO queueing mechanism") Signed-off-by: Josef Bacik Link: https://patch.msgid.link/20261028164415.1262013-32-axboe@kernel.dk Signed-off-by: Jens Axboe --- block/blk-mq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index b1c41ba518a6..b7da2f7ac60a 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1710,8 +1710,11 @@ static bool blk_mq_handle_expired(struct request *rq, void *priv) { struct blk_expired_data *expired = priv; - if (blk_mq_req_expired(rq, expired)) + if (blk_mq_req_expired(rq, expired)) { blk_mq_rq_timed_out(rq); + /* If its timer has been started again, count the new deadline */ + blk_mq_req_expired(rq, expired); + } return true; }