blk-timeout: fix blk_add_timer
PATCH 1/1 blk-timeout: fix blk_add_timer
Commit 8cb34819cdd5d(blk-mq: unshared timeout handler) introduces blk-mq's own timeout handler, and removes following line
blk_queue_rq_timed_out(q, blk_mq_rq_timed_out);
then cause blk_add_timer() to do nop in case of blk-mq.
This patch fixes the problem by bypassing the check for blk-mq.
Signe-off-by Ming Lei <[email protected]>
--- block/blk-timeout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
block/blk-timeout.c +2 -1
@@ -186,7 +186,8 @@ void blk_add_timer(struct request *req)struct request_queue *q = req->q;unsigned long expiry; -if (!q->rq_timed_out_fn) +/* mq needn't the handler */ +if (!q->mq_ops && !q->rq_timed_out_fn)return ;BUG_ON (!list_empty (&req->timeout_list));
Signature · 1 line
1.7.9.5
Jens Axboe
maintainerQuoted 8 lines · Ming Lei
Commit 8cb34819cdd5d(blk-mq: unshared timeout handler) introduces blk-mq's own timeout handler, and removes following line
blk_queue_rq_timed_out(q, blk_mq_rq_timed_out);then cause
blk_add_timer()to do nop in case of blk-mq.This patch fixes the problem by bypassing the check for blk-mq.
Good catch, this explains something I ran into yesterday on a missing timer. I had a hard time understanding your description here, I'll reword it a little bit and apply. Thanks!
Signature · 1 line
Jens Axboe