diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2025-03-08 18:21:15 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-03-10 07:14:27 -0600 |
commit | d291fb65202051e996cd983b29dce3e390421bc6 (patch) | |
tree | b123bfa5630d496b8699cd4e499d7f2f8d67b9fb /io_uring/rsrc.h | |
parent | 5027d02452c982bdc7b36205c66466ebd7e6ee17 (diff) |
io_uring: introduce io_prep_reg_iovec()
iovecs that are turned into registered buffers are imported in a special
way with an offset, so that later we can do an in place translation. Add
a helper function taking care of it.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/7de2ecb9ed5efc3c5cf320232236966da5ad4ccc.1741457480.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rsrc.h')
-rw-r--r-- | io_uring/rsrc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h index b0097c06b577..43f784915573 100644 --- a/io_uring/rsrc.h +++ b/io_uring/rsrc.h @@ -67,6 +67,8 @@ int io_import_reg_vec(int ddir, struct iov_iter *iter, struct io_kiocb *req, struct iou_vec *vec, unsigned nr_iovs, unsigned iovec_off, unsigned issue_flags); +int io_prep_reg_iovec(struct io_kiocb *req, struct iou_vec *iv, + const struct iovec __user *uvec, size_t uvec_segs); int io_register_clone_buffers(struct io_ring_ctx *ctx, void __user *arg); int io_sqe_buffers_unregister(struct io_ring_ctx *ctx); |