Linux block layer
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Anuj Gupta <anuj1072538@gmail.com>, axboe@kernel.dk, hch@lst.de
Cc: kbusch@kernel.org, linux-block@vger.kernel.org, anuj20.g@samsung.com
Subject: Re: [PATCH] block: don't use the bvec fast path for dma-buf bios
Date: Thu, 29 Oct 2026 11:49:30 +0000	[thread overview]
Message-ID: <9d7703c6-c502-4c2b-a896-3fe251198a3b@gmail.com> (raw)
In-Reply-To: <20261029105330.1427462-1-anuj1072538@gmail.com>

On 10/29/26 10:53, Anuj Gupta wrote:
> From: Anuj Gupta <anuj20.g@samsung.com>
> 
> bio_may_need_split() reads bi_io_vec, which for dma-buf bios aliases
> bi_dmabuf_map, and interprets the map as a bvec. Always run the full
> split check for dma-buf bios.

That's odd, I recall adding a check to bio_may_need_split() before.
Thanks, let me test it.

  
> Fixes: d88e44f43e93 ("block: introduce dma map backed bio type")
> Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
> ---
>   block/blk.h | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/block/blk.h b/block/blk.h
> index 50abfd932886..27b568cedc43 100644
> --- a/block/blk.h
> +++ b/block/blk.h
> @@ -404,6 +404,8 @@ static inline bool bio_may_need_split(struct bio *bio,
>   
>   	if (!bio->bi_io_vec)
>   		return true;
> +	if (op_is_dmabuf(bio->bi_opf))
> +		return true;
>   
>   	bv = __bvec_iter_bvec(bio->bi_io_vec, bio->bi_iter);
>   	if (bio->bi_iter.bi_size > bv->bv_len - bio->bi_iter.bi_offset)

-- 
Pavel Begunkov


  reply	other threads:[~2026-10-29 11:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 10:53 [PATCH] block: don't use the bvec fast path for dma-buf bios Anuj Gupta
2026-10-29 11:49 ` Pavel Begunkov [this message]
2026-10-29 12:34   ` Anuj gupta
2026-10-30  8:57 ` Pavel Begunkov
2026-11-03 14:31 ` Jens Axboe

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=9d7703c6-c502-4c2b-a896-3fe251198a3b@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=anuj1072538@gmail.com \
    --cc=anuj20.g@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox