Commit f5e350f0 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

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: da661267 ("blk-mq: don't time out requests again that are in the timeout handler")
Signed-off-by: default avatarBart 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: default avatarJens Axboe <axboe@kernel.dk>
parent 3ee7e869
...@@ -781,7 +781,6 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved) ...@@ -781,7 +781,6 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER); WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER);
} }
req->rq_flags &= ~RQF_TIMED_OUT;
blk_add_timer(req); blk_add_timer(req);
} }
......
...@@ -210,6 +210,7 @@ void blk_add_timer(struct request *req) ...@@ -210,6 +210,7 @@ void blk_add_timer(struct request *req)
if (!req->timeout) if (!req->timeout)
req->timeout = q->rq_timeout; req->timeout = q->rq_timeout;
req->rq_flags &= ~RQF_TIMED_OUT;
blk_rq_set_deadline(req, jiffies + req->timeout); blk_rq_set_deadline(req, jiffies + req->timeout);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment