diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-04-25 14:32:22 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-04-25 10:14:04 -0600 |
commit | c3bdad0271834214be01c1d687c262bf80da6eb0 (patch) | |
tree | 4370ef0a9912433d03d620f69abe1a624339ffa3 /include/uapi | |
parent | 792e35824be9af9fb4dac956229fb97bda04e25e (diff) | |
download | linux-c3bdad0271834214be01c1d687c262bf80da6eb0.tar.bz2 |
io_uring: add generic rsrc update with tags
Add IORING_REGISTER_RSRC_UPDATE, which also supports passing in rsrc
tags. Implement it for registered files.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/d4dc66df204212f64835ffca2c4eb5e8363f2f05.1619356238.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/io_uring.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index ce7b2fce6713..6d8360b5b9c5 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -299,6 +299,7 @@ enum { IORING_REGISTER_RESTRICTIONS = 11, IORING_REGISTER_ENABLE_RINGS = 12, IORING_REGISTER_RSRC = 13, + IORING_REGISTER_RSRC_UPDATE = 14, /* this goes last */ IORING_REGISTER_LAST @@ -311,12 +312,6 @@ struct io_uring_files_update { __aligned_u64 /* __s32 * */ fds; }; -struct io_uring_rsrc_update { - __u32 offset; - __u32 resv; - __aligned_u64 data; -}; - enum { IORING_RSRC_FILE = 0, }; @@ -328,6 +323,21 @@ struct io_uring_rsrc_register { __aligned_u64 tags; }; +struct io_uring_rsrc_update { + __u32 offset; + __u32 resv; + __aligned_u64 data; +}; + +struct io_uring_rsrc_update2 { + __u32 offset; + __u32 resv; + __aligned_u64 data; + __aligned_u64 tags; + __u32 type; + __u32 nr; +}; + /* Skip updating fd indexes set to this value in the fd table */ #define IORING_REGISTER_FILES_SKIP (-2) |