diff options
| author | Josef Bacik <josef@toxicpanda.com> | 2026-10-28 10:41:34 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-10-29 07:15:47 -0600 |
| commit | 0db9f8968a8941d4fc9fddf220d4983d9b68deaf (patch) | |
| tree | c1483edda02cd580fe3a2e26338f560bea7ef9a4 | |
| parent | 9531230ee1fcb8eca2c9cbb9bf02651cbf798842 (diff) | |
| download | linux-0db9f8968a8941d4fc9fddf220d4983d9b68deaf.tar.gz linux-0db9f8968a8941d4fc9fddf220d4983d9b68deaf.zip | |
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 <josef@toxicpanda.com>
Link: https://patch.msgid.link/20261028164415.1262013-32-axboe@kernel.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | block/blk-mq.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |
