* [PATCH] block: don't use the bvec fast path for dma-buf bios
@ 2026-10-29 10:53 Anuj Gupta
2026-10-29 11:49 ` Pavel Begunkov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Anuj Gupta @ 2026-10-29 10:53 UTC (permalink / raw)
To: axboe, asml.silence, hch; +Cc: kbusch, linux-block, anuj20.g
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.
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)
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] block: don't use the bvec fast path for dma-buf bios
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
2026-10-29 12:34 ` Anuj gupta
2026-10-30 8:57 ` Pavel Begunkov
2026-11-03 14:31 ` Jens Axboe
2 siblings, 1 reply; 5+ messages in thread
From: Pavel Begunkov @ 2026-10-29 11:49 UTC (permalink / raw)
To: Anuj Gupta, axboe, hch; +Cc: kbusch, linux-block, anuj20.g
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
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] block: don't use the bvec fast path for dma-buf bios
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
@ 2026-10-30 8:57 ` Pavel Begunkov
2026-11-03 14:31 ` Jens Axboe
2 siblings, 0 replies; 5+ messages in thread
From: Pavel Begunkov @ 2026-10-30 8:57 UTC (permalink / raw)
To: Anuj Gupta, axboe, hch; +Cc: kbusch, linux-block, anuj20.g
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.
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] block: don't use the bvec fast path for dma-buf bios
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
2026-10-30 8:57 ` Pavel Begunkov
@ 2026-11-03 14:31 ` Jens Axboe
2 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2026-11-03 14:31 UTC (permalink / raw)
To: asml.silence, hch, Anuj Gupta; +Cc: kbusch, linux-block, anuj20.g
On Thu, 29 Oct 2026 16:23:30 +0530, Anuj Gupta wrote:
> 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.
Applied, thanks!
[1/1] block: don't use the bvec fast path for dma-buf bios
commit: 801bddbf1e4147a69b811c548c35a06a157941b4
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-03 14:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-10-29 12:34 ` Anuj gupta
2026-10-30 8:57 ` Pavel Begunkov
2026-11-03 14:31 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox