Man page - io_uring_clone_buffers(3)
Packages contains this manual
- io_uring_register_buffers_sparse(3)
- io_uring_register_napi(3)
- io_uring_prep_poll_multishot(3)
- io_uring_prep_multishot_accept_direct(3)
- io_uring_prep_multishot_accept(3)
- io_uring_clone_buffers(3)
- io_uring_buf_ring_available(3)
- io_uring_submit_and_wait_reg(3)
- io_uring_prep_futex_waitv(3)
- io_uring_prep_rename(3)
- io_uring_major_version(3)
- io_uring_prep_mkdir(3)
- io_uring_register_files_update(3)
- io_uring_sq_ready(3)
- io_uring_register_reg_wait(3)
- io_uring_prep_timeout(3)
- io_uring_register_iowq_aff(3)
- io_uring_submit(3)
- io_uring_unregister_napi(3)
- io_uring_prep_open_direct(3)
- io_uring_queue_init_params(3)
- io_uring_prep_openat2_direct(3)
- io_uring_buf_ring_advance(3)
- io_uring_unregister_eventfd(3)
- io_uring_submit_and_wait_min_timeout(3)
- io_uring_recvmsg_cmsg_nexthdr(3)
- io_uring_prep_renameat(3)
- io_uring_prep_recv(3)
- io_uring_prep_unlink(3)
- io_uring_prep_cancel(3)
- io_uring_prep_mkdirat(3)
- io_uring_prep_getxattr(3)
- io_uring_prep_close(3)
- io_uring_prep_send(3)
- io_uring_enable_rings(3)
- io_uring_register_clock(3)
- io_uring_minor_version(3)
- io_uring_prep_send_set_addr(3)
- io_uring_prep_sendmsg(3)
- io_uring_prep_fixed_fd_install(3)
- io_uring_queue_exit(3)
- io_uring_submit_and_wait_timeout(3)
- io_uring_for_each_cqe(3)
- io_uring_setup_reg_wait(3)
- io_uring_sqe_set_buf_group(3)
- io_uring_prep_sendmsg_zc(3)
- io_uring_prep_read_fixed(3)
- io_uring_submit_and_get_events(3)
- io_uring_unregister_buffers(3)
- io_uring_prep_symlink(3)
- io_uring_prep_send_zc_fixed(3)
- io_uring_prep_connect(3)
- io_uring_buf_ring_mask(3)
- io_uring_prep_cmd(3)
- io_uring_prep_sendto(3)
- io_uring_prep_write(3)
- io_uring_prep_files_update(3)
- io_uring_prep_setxattr(3)
- io_uring_peek_batch_cqe(3)
- io_uring_prep_msg_ring(3)
- io_uring_prep_cmd_discard(3)
- io_uring_prep_writev2(3)
- io_uring_register_sync_cancel(3)
- io_uring_prep_poll_add(3)
- io_uring_prep_close_direct(3)
- io_uring_prep_unlinkat(3)
- io_uring_recvmsg_validate(3)
- io_uring_prep_fgetxattr(3)
- io_uring_register_buf_ring(3)
- io_uring_unregister_files(3)
- io_uring_prep_splice(3)
- io_uring_register_buffers(3)
- io_uring_prep_ftruncate(3)
- io_uring_prep_recvmsg(3)
- io_uring_prep_poll_remove(3)
- io_uring_prep_link_timeout(3)
- io_uring_peek_cqe(3)
- io_uring_resize_rings(3)
- io_uring_prep_msg_ring_cqe_flags(3)
- io_uring_prep_statx(3)
- io_uring_free_reg_wait(3)
- io_uring_register(2)
- io_uring_cqe_seen(3)
- io_uring_prep_recv_multishot(3)
- io_uring_enter2(2)
- io_uring_prep_poll_update(3)
- io_uring_prep_readv2(3)
- io_uring_prep_writev(3)
- io_uring_unregister_iowq_aff(3)
- io_uring_get_sqe(3)
- io_uring_clone_buffers_offset(3)
- io_uring_prep_tee(3)
- io_uring_prep_bind(3)
- io_uring_prep_msg_ring_fd(3)
- io_uring_prep_openat_direct(3)
- io_uring(7)
- io_uring_wait_cqe_timeout(3)
- io_uring_prep_provide_buffers(3)
- io_uring_setup_buf_ring(3)
- io_uring_sqe_set_flags(3)
- io_uring_prep_futex_wake(3)
- io_uring_register_ring_fd(3)
- io_uring_submit_and_wait(3)
- io_uring_wait_cqes_min_timeout(3)
- io_uring_prep_sync_file_range(3)
- io_uring_wait_cqe_nr(3)
- io_uring_prep_send_zc(3)
- io_uring_cqe_get_data64(3)
- io_uring_cq_ready(3)
- io_uring_free_probe(3)
- io_uring_prep_accept_direct(3)
- io_uring_prep_fsetxattr(3)
- io_uring_enter(2)
- io_uring_queue_init(3)
- io_uring_register_files_tags(3)
- io_uring_prep_openat2(3)
- io_uring_get_events(3)
- io_uring_close_ring_fd(3)
- io_uring_register_file_alloc_range(3)
- io_uring_cq_has_overflow(3)
- io_uring_prep_symlinkat(3)
- io_uring_wait_cqes(3)
- io_uring_prep_fsync(3)
- io_uring_sqe_set_data(3)
- io_uring_wait_cqe(3)
- io_uring_opcode_supported(3)
- io_uring_prep_cancel_fd(3)
- io_uring_register_buffers_update_tag(3)
- io_uring_sq_space_left(3)
- io_uring_prep_read_multishot(3)
- io_uring_buf_ring_cq_advance(3)
- io_uring_prep_write_fixed(3)
- io_uring_prep_msg_ring_fd_alloc(3)
- io_uring_recvmsg_payload(3)
- io_uring_prep_remove_buffers(3)
- io_uring_prep_readv(3)
- io_uring_prep_nop(3)
- io_uring_prep_fallocate(3)
- io_uring_buf_ring_add(3)
- io_uring_prep_send_bundle(3)
- io_uring_sqe_set_data64(3)
- io_uring_unregister_buf_ring(3)
- io_uring_prep_linkat(3)
- io_uring_prep_fadvise64(3)
- io_uring_prep_fadvise(3)
- io_uring_prep_open(3)
- io_uring_cqe_get_data(3)
- io_uring_register_eventfd_async(3)
- io_uring_prep_read(3)
- io_uring_sqring_wait(3)
- __io_uring_buf_ring_cq_advance(3)
- io_uring_recvmsg_name(3)
- io_uring_prep_listen(3)
- io_uring_queue_init_mem(3)
- io_uring_register_eventfd(3)
- io_uring_recvmsg_payload_length(3)
- io_uring_prep_socket_direct_alloc(3)
- io_uring_get_probe(3)
- io_uring_register_files(3)
- io_uring_prep_link(3)
- io_uring_prep_waitid(3)
- io_uring_check_version(3)
- io_uring_cq_advance(3)
- io_uring_prep_madvise(3)
- io_uring_prep_accept(3)
- io_uring_register_files_sparse(3)
- io_uring_buf_ring_init(3)
- io_uring_prep_socket(3)
- io_uring_prep_shutdown(3)
- io_uring_recvmsg_out(3)
- io_uring_prep_timeout_remove(3)
- io_uring_prep_recvmsg_multishot(3)
- io_uring_unregister_ring_fd(3)
- io_uring_prep_openat(3)
- io_uring_free_buf_ring(3)
- io_uring_prep_timeout_update(3)
- io_uring_register_buffers_tags(3)
- io_uring_register_iowq_max_workers(3)
- io_uring_register_files_update_tag(3)
- io_uring_prep_futex_wait(3)
- io_uring_recvmsg_cmsg_firsthdr(3)
- io_uring_prep_madvise64(3)
- io_uring_prep_cancel64(3)
- io_uring_setup(2)
- io_uring_prep_socket_direct(3)
apt-get install liburing-dev
Manual
io_uring_clone_buffers
NAMESYNOPSIS
DESCRIPTION
NOTES
RETURN VALUE
SEE ALSO
NAME
io_uring_clone_buffers - Clones registered buffers between rings
SYNOPSIS
#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
);
DESCRIPTION
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.
NOTES
The source and target ring must shared address spaces, and hence internal kernel accounting.
RETURN VALUE
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. |
SEE ALSO
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)