summaryrefslogtreecommitdiffstats
path: root/io_uring/opdef.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-09-11 21:46:07 +0200
committerJens Axboe <axboe@kernel.dk>2023-09-21 20:00:46 +0200
commitd2d778fbf9964e4e5b8d7420eba8ec5ce938e794 (patch)
tree847bb33ec1926213798971656eaf414f83566a54 /io_uring/opdef.h
parentio_uring/rw: split io_read() into a helper (diff)
downloadlinux-d2d778fbf9964e4e5b8d7420eba8ec5ce938e794.tar.xz
linux-d2d778fbf9964e4e5b8d7420eba8ec5ce938e794.zip
io_uring/rw: mark readv/writev as vectored in the opcode definition
This is cleaner than gating on the opcode type, particularly as more read/write type opcodes may be added. Then we can use that for the data import, and for __io_read() on whether or not we need to copy state. Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/opdef.h')
-rw-r--r--io_uring/opdef.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/opdef.h b/io_uring/opdef.h
index c22c8696e749..9e5435ec27d0 100644
--- a/io_uring/opdef.h
+++ b/io_uring/opdef.h
@@ -29,6 +29,8 @@ struct io_issue_def {
unsigned iopoll_queue : 1;
/* opcode specific path will handle ->async_data allocation if needed */
unsigned manual_alloc : 1;
+ /* vectored opcode, set if 1) vectored, and 2) handler needs to know */
+ unsigned vectored : 1;
int (*issue)(struct io_kiocb *, unsigned int);
int (*prep)(struct io_kiocb *, const struct io_uring_sqe *);