From: Ming Lei <ming.lei@canonical.com>
To: linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>, Ming Lei <ming.lei@canonical.com>
Subject: [PATCH] blk-timeout: fix blk_add_timer
Date: Fri, 19 Sep 2014 21:53:46 +0800 [thread overview]
Message-ID: <1411134826-6772-1-git-send-email-ming.lei@canonical.com> (raw)
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
next reply other threads:[~2014-09-19 13:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 13:53 Ming Lei [this message]
2014-09-19 14:12 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411134826-6772-1-git-send-email-ming.lei@canonical.com \
--to=ming.lei@canonical.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®