From: majianpeng <majianpeng@gmail.com>
To: axboe <axboe@kernel.dk>, NeilBrown <neilb@suse.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-raid <linux-raid@vger.kernel.org>
Subject: [PATCH 2/3] block: Check bio can merge before call attempt_plug_merge.
Date: Wed, 30 Oct 2013 10:41:42 +0800 [thread overview]
Message-ID: <2013103010413863125714@gmail.com> (raw)
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
block/blk-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 0a00e4e..fb970fd 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1492,7 +1492,7 @@ void blk_queue_bio(struct request_queue *q, struct bio *bio)
* Check if we can merge with the plugged list before grabbing
* any locks.
*/
- if (attempt_plug_merge(q, bio, &request_count))
+ if (likely(bio_mergeable(bio)) && attempt_plug_merge(q, bio, &request_count))
return;
spin_lock_irq(q->queue_lock);
--
1.8.4
WARNING: multiple messages have this Message-ID (diff)
From: majianpeng <majianpeng@gmail.com>
To: axboe <axboe@kernel.dk>, NeilBrown <neilb@suse.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-raid <linux-raid@vger.kernel.org>
Subject: [PATCH 2/3] block: Check bio can merge before call attempt_plug_merge.
Date: Wed, 30 Oct 2013 10:41:42 +0800 [thread overview]
Message-ID: <2013103010413863125714@gmail.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 766 bytes --]
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
block/blk-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 0a00e4e..fb970fd 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1492,7 +1492,7 @@ void blk_queue_bio(struct request_queue *q, struct bio *bio)
* Check if we can merge with the plugged list before grabbing
* any locks.
*/
- if (attempt_plug_merge(q, bio, &request_count))
+ if (likely(bio_mergeable(bio)) && attempt_plug_merge(q, bio, &request_count))
return;
spin_lock_irq(q->queue_lock);
--
1.8.4ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next reply other threads:[~2013-10-30 2:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 2:41 majianpeng [this message]
2013-10-30 2:41 ` [PATCH 2/3] block: Check bio can merge before call attempt_plug_merge majianpeng
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=2013103010413863125714@gmail.com \
--to=majianpeng@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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.