summaryrefslogtreecommitdiff
path: root/include/uapi/linux/io_uring.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-10-29 07:50:56 -0600
committerJens Axboe <axboe@kernel.dk>2024-11-02 15:45:30 -0600
commitc1329532d5aabecf79788924941afb8a7b7c1024 (patch)
tree2da3518fc3cb679aaee5e6b2b9dc58486df063b7 /include/uapi/linux/io_uring.h
parentb16e920a1909da6799c43000db730d8fcdcae907 (diff)
io_uring/rsrc: allow cloning with node replacements
Currently cloning a buffer table will fail if the destination already has a table. But it should be possible to use it to replace existing elements. Add a IORING_REGISTER_DST_REPLACE cloning flag, which if set, will allow the destination to already having a buffer table. If that is the case, then entries designated by offset + nr buffers will be replaced if they already exist. Note that it's allowed to use IORING_REGISTER_DST_REPLACE and not have an existing table, in which case it'll work just like not having the flag set and an empty table - it'll just assign the newly created table for that case. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi/linux/io_uring.h')
-rw-r--r--include/uapi/linux/io_uring.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index cc8dbe78c126..ce58c4590de6 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -713,7 +713,8 @@ struct io_uring_clock_register {
};
enum {
- IORING_REGISTER_SRC_REGISTERED = 1,
+ IORING_REGISTER_SRC_REGISTERED = (1U << 0),
+ IORING_REGISTER_DST_REPLACE = (1U << 1),
};
struct io_uring_clone_buffers {