linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: early return from blk_queue_split() if q->bio_split is NULL
@ 2017-11-20 16:54 Mike Snitzer
  2017-11-21 14:24 ` Mike Snitzer
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Snitzer @ 2017-11-20 16:54 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, dm-devel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-21 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-20 16:54 [PATCH] block: early return from blk_queue_split() if q->bio_split is NULL Mike Snitzer
2017-11-21 14:24 ` Mike Snitzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).