From: Shaohua Li <shli@kernel.org>
To: axboe@kernel.dk
Cc: linux-kernel@vger.kernel.org
Subject: [patch]blk-mq: mq plug list breakage
Date: Wed, 30 Oct 2013 01:30:47 +0800 [thread overview]
Message-ID: <20131029173047.GA12405@kernel.org> (raw)
We switched to plug mq_list for mq, but some code are still using old list.
Signed-off-by: Shaohua Li <shli@fusionio.com>
---
block/blk-core.c | 8 +++++++-
block/blk-mq.c | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
Index: linux/block/blk-core.c
===================================================================
--- linux.orig/block/blk-core.c 2013-10-29 11:26:16.556586892 -0600
+++ linux/block/blk-core.c 2013-10-29 11:26:21.014356939 -0600
@@ -1411,6 +1411,7 @@
struct blk_plug *plug;
struct request *rq;
bool ret = false;
+ struct list_head *plug_list;
if (blk_queue_nomerges(q))
goto out;
@@ -1420,7 +1421,12 @@
goto out;
*request_count = 0;
- list_for_each_entry_reverse(rq, &plug->list, queuelist) {
+ if (q->mq_ops)
+ plug_list = &plug->mq_list;
+ else
+ plug_list = &plug->list;
+
+ list_for_each_entry_reverse(rq, plug_list, queuelist) {
int el_ret;
if (rq->q == q)
Index: linux/block/blk-mq.c
===================================================================
--- linux.orig/block/blk-mq.c 2013-10-29 11:26:16.556586892 -0600
+++ linux/block/blk-mq.c 2013-10-29 11:26:21.014356939 -0600
@@ -950,7 +950,7 @@
if (plug) {
blk_mq_bio_to_request(rq, bio);
- if (list_empty(&plug->list))
+ if (list_empty(&plug->mq_list))
trace_block_plug(q);
else if (request_count >= BLK_MAX_REQUEST_COUNT) {
blk_flush_plug_list(plug, false);
reply other threads:[~2013-10-29 17:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20131029173047.GA12405@kernel.org \
--to=shli@kernel.org \
--cc=axboe@kernel.dk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.