lkml.org 
[lkml]   [2014]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] blk-timeout: fix blk_add_timer
Date
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 <ming.lei@canonical.com>
---
block/blk-timeout.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 4d44825..0c2375c 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -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));
--
1.7.9.5


\
 
 \ /
  Last update: 2014-09-19 16:21    [W:0.023 / U:1.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site