diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2026-10-14 12:02:02 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-10-14 07:36:02 -0600 |
| commit | d88e44f43e939e6ac0ca8302c6f3c957b33aa5fe (patch) | |
| tree | 22bba0bc2cfe5dea5e32f32e90f30904b83f8174 /tools/lib/python | |
| parent | 801503b9a66f7c2423b5e495d8e77e0f4447e5d4 (diff) | |
block: introduce dma map backed bio type
Premapped buffers don't require a generic bio_vec since these have
already been dma mapped. Repurpose the bi_io_vec space to store dmabuf
maps as they are mutually exclusive.
The bio splitting differs from the normal path because it's already
pre-mapped and for the block layer it's just an offset into the dma-buf.
The actual segmentation is only available to the importer driver and not
the block layer, however, it doesn't contain alignment gaps and we don't
have to check it. For the same reason we can't precisely split by the
number of segments, but we use ->min_seg_shift stored in the map to
calculate the minimum number of bytes a request consisting of
lim->max_segments full segments can cover and split by that. It's
stricter and can add extra splitting. E.g. for a {4K, 4G} segmentation,
the min segment size is 4K, and we'll split it into bios of
(4K * lim->max_segments) bytes each, but it should be good enough for
now to cover the most popular use cases.
Suggested-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/39b964cf7510f42755188563da63d3d5acaf2aa9.1791975048.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
