NAME | SYNOPSIS | DESCRIPTION | NOTES | RETURN VALUE | SEE ALSO | COLOPHON |
|
|
io_uring_clone_buffers(3) liburing Manual io_uring_clone_buffers(3)
io_uring_clone_buffers - Clones registered buffers between rings
#include <liburing.h> int io_uring_clone_buffers(struct io_uring *dst, struct io_uring * src); int io_uring_clone_buffers_offset(struct io_uring *dst, struct io_uring * src, unsigned int dst_off, unsigned int src_off, unsigned int nr, unsigned int flags);
The io_uring_clone_buffers(3) function clones registered buffers from the ring indicated by src to the ring indicated by dst. Upon successful completion of this operation, src and dst will have the same set of registered buffers. This operation is identical to performing a io_uring_register_buffers(3) operation on the dst ring, if the src ring previously had that same buffer registration operating done. The dst ring must not have any buffers currently registered. If buffers are currently registered on the destination ring, they must be unregistered with io_uring_unregister_buffers(3) first. Available since kernel 6.12. The io_uring_clone_buffers_offset(3) function also clones buffers from the src ring to the dst ring, however it supports cloning only a subset of the buffers, where io_uring_clone_buffers(3) always clones all of them. dst_off indicates at what offset cloning should start in the destination, src_off indicates at what offset cloning should start in the source, and nr indicates how many buffers to clone at the given offset. If both dst_off, src_off, and nr are given as 0 , then io_uring_clone_buffers_offset(3) performs the same action as io_uring_clone_buffers(3). flags may be set to the following value: IORING_REGISTER_DST_REPLACE If set, cloning may happen for a destination ring that already has a buffer table assigned. In that case, existing nodes that overlap with the specified range will be released and replaced.IORING_REGISTER_DST_REPLACE If set, cloning may happen for a destination ring that already has a buffer table assigned. In that case, existing nodes that overlap with the specified range will be released and replaced. Available since kernel 6.13.
The source and target ring must shared address spaces, and hence internal kernel accounting.
On success io_uring_clone_buffers(3) and io_uring_clone_buffers_offset(3) return 0. On failure, they returns -errno, specifically -EBUSY The destination ring already has buffers registered, and IORING_REGISTER_DST_REPLACE wasn't set. -ENOMEM The kernel ran out of memory. -ENXIO The source ring doesn't have any buffers registered.
io_uring_register(2), io_uring_unregister_buffers(3), io_uring_register_buffers(3), io_uring_prep_read_fixed(3), io_uring_prep_write_fixed(3)
This page is part of the liburing (A library for io_uring)
project. Information about the project can be found at
⟨https://github.com/axboe/liburing⟩. If you have a bug report for
this manual page, send it to io-uring@vger.kernel.org. This page
was obtained from the project's upstream Git repository
⟨https://github.com/axboe/liburing⟩ on 2025-02-02. (At that time,
the date of the most recent commit that was found in the
repository was 2025-01-22.) If you discover any rendering
problems in this HTML version of the page, or you believe there is
a better or more up-to-date source for the page, or you have
corrections or improvements to the information in this COLOPHON
(which is not part of the original manual page), send a mail to
man-pages@man7.org
liburing-2.9 September 12, 2024 io_uring_clone_buffers(3)
Pages that refer to this page: io_uring_clone_buffers(3), io_uring_clone_buffers_offset(3)