Skip to content

Commit

Permalink
blk-mq: Fix timeout handling in case the timeout handler returns BLK_…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Jianchao Wang <[email protected]>
Cc: Andrew Randrianasulu <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
KAGA-KOKO authored and axboe committed Jun 23, 2018
1 parent 3ee7e86 commit f5e350f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,6 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER);
}

req->rq_flags &= ~RQF_TIMED_OUT;
blk_add_timer(req);
}

Expand Down
1 change: 1 addition & 0 deletions block/blk-timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ void blk_add_timer(struct request *req)
if (!req->timeout)
req->timeout = q->rq_timeout;

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

/*
Expand Down

0 comments on commit f5e350f

Please sign in to comment.