linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, dm-devel@redhat.com, ming.lei@redhat.com
Subject: Re: block: early return from blk_queue_split() if q->bio_split is NULL
Date: Tue, 21 Nov 2017 09:24:19 -0500	[thread overview]
Message-ID: <20171121142418.GA17681@redhat.com> (raw)
In-Reply-To: <20171120165401.GA10608@redhat.com>

On Mon, Nov 20 2017 at 11:54am -0500,
Mike Snitzer <snitzer@redhat.com> wrote:

> 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
> 

Please ignore this patch.  While the patch is perfectly valid, it
doesn't have an existing consumer.  Ming pointed out that, in constrat
to blk_queue_bio(), bio-based DM's dm_make_request() makes it so that
DM never calls blk_queue_split().

Mike

      reply	other threads:[~2017-11-21 14:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20171121142418.GA17681@redhat.com \
    --to=snitzer@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).