From: Mike Snitzer <snitzer@redhat.com>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, dm-devel@redhat.com
Subject: [PATCH] block: early return from blk_queue_split() if q->bio_split is NULL
Date: Mon, 20 Nov 2017 11:54:02 -0500 [thread overview]
Message-ID: <20171120165401.GA10608@redhat.com> (raw)
DM appears to be the only block driver that doesn't lean on the block
core's bio splitting. My hope is to fix that but in the meantime it
doesn't make sense for a device that doesn't need blk_queue_split() to
go through the associated work.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
block/blk-merge.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index f5dedd5..212004c 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -186,6 +186,9 @@ void blk_queue_split(struct request_queue *q, struct bio **bio)
struct bio *split, *res;
unsigned nsegs;
+ if (!q->bio_split)
+ return;
+
switch (bio_op(*bio)) {
case REQ_OP_DISCARD:
case REQ_OP_SECURE_ERASE:
--
2.10.1
next reply other threads:[~2017-11-20 16:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 16:54 Mike Snitzer [this message]
2017-11-21 14:24 ` block: early return from blk_queue_split() if q->bio_split is NULL Mike Snitzer
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=20171120165401.GA10608@redhat.com \
--to=snitzer@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=linux-block@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.