]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring: add infra for importing vectored reg buffers
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 7 Mar 2025 16:00:30 +0000 (16:00 +0000)
committerJens Axboe <axboe@kernel.dk>
Fri, 7 Mar 2025 16:07:29 +0000 (09:07 -0700)
commit9ef4cbbcb4ac3786a1a4164507511b76b2a572c5
tree87662f3bbcbbeca883a536cd8362e6f81121d905
parente1d499590977a492ae120d9263bd55076aabd460
io_uring: add infra for importing vectored reg buffers

Add io_import_reg_vec(), which will be responsible for importing
vectored registered buffers. The function might reallocate the vector,
but it'd try to do the conversion in place first, which is why it's
required of the user to pad the iovec to the right border of the cache.

Overlapping also depends on struct iovec being larger than bvec, which
is not the case on e.g. 32 bit architectures. Don't try to complicate
this case and make sure vectors never overlap, it'll be improved later.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/60bd246b1249476a6996407c1dbc38ef6febad14.1741362889.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/rsrc.c
io_uring/rsrc.h