mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

io_uring_cmd_import_fixed_vec() is a cmd helper around vectored registered buffer import functions, which caches the memory under the hood. The lifetime of the vectore and hence the iterator is bound to the request. Furthermore, the user is not allowed to call it multiple times for a single request. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/97487a80dec3fb8cf8aeedf1f9026ef6d503fe4b.1742579999.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
24 lines
730 B
C
24 lines
730 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/io_uring/cmd.h>
|
|
#include <linux/io_uring_types.h>
|
|
|
|
struct io_async_cmd {
|
|
struct io_uring_cmd_data data;
|
|
struct iou_vec vec;
|
|
};
|
|
|
|
int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags);
|
|
int io_uring_cmd_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
|
void io_uring_cmd_cleanup(struct io_kiocb *req);
|
|
|
|
bool io_uring_try_cancel_uring_cmd(struct io_ring_ctx *ctx,
|
|
struct io_uring_task *tctx, bool cancel_all);
|
|
|
|
void io_cmd_cache_free(const void *entry);
|
|
|
|
int io_uring_cmd_import_fixed_vec(struct io_uring_cmd *ioucmd,
|
|
const struct iovec __user *uvec,
|
|
size_t uvec_segs,
|
|
int ddir, struct iov_iter *iter,
|
|
unsigned issue_flags);
|