Skip to content

Commit f5e350f

Browse files
KAGA-KOKOaxboe
authored andcommitted
blk-mq: Fix timeout handling in case the timeout handler returns BLK_EH_DONE
Make sure that RQF_TIMED_OUT is cleared when a request is reused after a block driver timeout handler has returned BLK_EH_DONE. Fixes: da66126 ("blk-mq: don't time out requests again that are in the timeout handler") Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Jianchao Wang <jianchao.w.wang@oracle.com> Cc: Andrew Randrianasulu <randrianasulu@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 3ee7e86 commit f5e350f

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

‎block/blk-mq.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,6 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
781781
WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER);
782782
}
783783

784-
req->rq_flags &= ~RQF_TIMED_OUT;
785784
blk_add_timer(req);
786785
}
787786

‎block/blk-timeout.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ void blk_add_timer(struct request *req)
210210
if (!req->timeout)
211211
req->timeout = q->rq_timeout;
212212

213+
req->rq_flags &= ~RQF_TIMED_OUT;
213214
blk_rq_set_deadline(req, jiffies + req->timeout);
214215

215216
/*

0 commit comments

Comments
 (0)