summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-03-07 16:00:30 +0000
committerJens Axboe <axboe@kernel.dk>2025-03-07 09:07:29 -0700
commit9ef4cbbcb4ac3786a1a4164507511b76b2a572c5 (patch)
tree87662f3bbcbbeca883a536cd8362e6f81121d905 /include
parente1d499590977a492ae120d9263bd55076aabd460 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/io_uring_types.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index 9101f12d21ef..cc84f6e5a64c 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -111,8 +111,11 @@ struct io_uring_task {
};
struct iou_vec {
- struct iovec *iovec;
- unsigned nr;
+ union {
+ struct iovec *iovec;
+ struct bio_vec *bvec;
+ };
+ unsigned nr; /* number of struct iovec it can hold */
};
struct io_uring {