Linux block layer
 help / color / mirror / Atom feed
* [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

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