History

io_uring/rsrc: allow cloning at an offset

Right now buffer cloning is an all-or-nothing kind of thing - either the whole table is cloned from a source to a destination ring, or nothing at all. However, it's not always desired to clone the whole thing. Allow for the application to specify a source and destination offset, and a number of buffers to clone. If the destination offset is non-zero, then allocate sparse nodes upfront.

Jens Axboe committed 2 years ago

Commit b16e9201 parent d50f94d2 files · +30 −7Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/io_uring.h+4−1
@@ -719,7 +719,10 @@ enum { · 718 unmodified lines
719719 struct io_uring_clone_buffers {
720720 __u32 src_fd;
721721 __u32 flags;
722− __u32 pad[6];
722+ __u32 src_off;
723+ __u32 dst_off;
724+ __u32 nr;
725+ __u32 pad[3];
723726 };
724727
725728 struct io_uring_buf {