polyphony 0.94 → 0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +2 -2
- data/.gitignore +3 -3
- data/CHANGELOG.md +14 -0
- data/docs/api-reference/fiber.md +2 -2
- data/docs/api-reference/object.md +3 -3
- data/docs/main-concepts/exception-handling.md +2 -2
- data/ext/polyphony/backend_common.c +3 -3
- data/ext/polyphony/backend_io_uring.c +18 -16
- data/ext/polyphony/event.c +1 -1
- data/ext/polyphony/extconf.rb +5 -3
- data/ext/polyphony/fiber.c +5 -13
- data/ext/polyphony/io_extensions.c +1 -1
- data/ext/polyphony/pipe.c +1 -1
- data/ext/polyphony/polyphony.c +1 -1
- data/ext/polyphony/polyphony_ext.c +1 -1
- data/ext/polyphony/queue.c +1 -1
- data/ext/polyphony/ring_buffer.c +1 -0
- data/ext/polyphony/socket_extensions.c +1 -1
- data/ext/polyphony/thread.c +1 -1
- data/lib/polyphony/extensions/enumerator.rb +16 -0
- data/lib/polyphony/extensions/socket.rb +2 -0
- data/lib/polyphony/extensions.rb +1 -0
- data/lib/polyphony/version.rb +1 -1
- data/polyphony.gemspec +2 -2
- data/test/test_backend.rb +5 -1
- data/test/test_enumerator.rb +46 -0
- data/test/test_io.rb +241 -216
- data/test/test_socket.rb +1 -1
- data/test/test_thread_pool.rb +3 -3
- data/vendor/liburing/.github/workflows/build.yml +51 -5
- data/vendor/liburing/.github/workflows/shellcheck.yml +1 -1
- data/vendor/liburing/.gitignore +6 -123
- data/vendor/liburing/CHANGELOG +35 -0
- data/vendor/liburing/CITATION.cff +11 -0
- data/vendor/liburing/LICENSE +16 -3
- data/vendor/liburing/Makefile +3 -1
- data/vendor/liburing/Makefile.common +1 -0
- data/vendor/liburing/README +14 -2
- data/vendor/liburing/SECURITY.md +6 -0
- data/vendor/liburing/configure +16 -15
- data/vendor/liburing/examples/Makefile +4 -1
- data/vendor/liburing/examples/io_uring-udp.c +395 -0
- data/vendor/liburing/examples/poll-bench.c +101 -0
- data/vendor/liburing/examples/send-zerocopy.c +339 -0
- data/vendor/liburing/liburing.spec +1 -1
- data/vendor/liburing/man/io_uring.7 +38 -11
- data/vendor/liburing/man/io_uring_buf_ring_add.3 +53 -0
- data/vendor/liburing/man/io_uring_buf_ring_advance.3 +31 -0
- data/vendor/liburing/man/io_uring_buf_ring_cq_advance.3 +41 -0
- data/vendor/liburing/man/io_uring_buf_ring_init.3 +30 -0
- data/vendor/liburing/man/io_uring_buf_ring_mask.3 +27 -0
- data/vendor/liburing/man/io_uring_cq_advance.3 +29 -15
- data/vendor/liburing/man/io_uring_cq_has_overflow.3 +25 -0
- data/vendor/liburing/man/io_uring_cq_ready.3 +9 -8
- data/vendor/liburing/man/io_uring_cqe_get_data.3 +32 -13
- data/vendor/liburing/man/io_uring_cqe_get_data64.3 +1 -0
- data/vendor/liburing/man/io_uring_cqe_seen.3 +22 -12
- data/vendor/liburing/man/io_uring_enter.2 +249 -32
- data/vendor/liburing/man/io_uring_enter2.2 +1 -0
- data/vendor/liburing/man/io_uring_free_probe.3 +11 -8
- data/vendor/liburing/man/io_uring_get_events.3 +33 -0
- data/vendor/liburing/man/io_uring_get_probe.3 +9 -8
- data/vendor/liburing/man/io_uring_get_sqe.3 +29 -10
- data/vendor/liburing/man/io_uring_opcode_supported.3 +11 -10
- data/vendor/liburing/man/io_uring_peek_cqe.3 +38 -0
- data/vendor/liburing/man/io_uring_prep_accept.3 +197 -0
- data/vendor/liburing/man/io_uring_prep_accept_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_cancel.3 +118 -0
- data/vendor/liburing/man/io_uring_prep_cancel64.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_close.3 +59 -0
- data/vendor/liburing/man/io_uring_prep_close_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_connect.3 +66 -0
- data/vendor/liburing/man/io_uring_prep_fadvise.3 +59 -0
- data/vendor/liburing/man/io_uring_prep_fallocate.3 +59 -0
- data/vendor/liburing/man/io_uring_prep_files_update.3 +92 -0
- data/vendor/liburing/man/io_uring_prep_fsync.3 +70 -0
- data/vendor/liburing/man/io_uring_prep_link.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_linkat.3 +91 -0
- data/vendor/liburing/man/io_uring_prep_madvise.3 +56 -0
- data/vendor/liburing/man/io_uring_prep_mkdir.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_mkdirat.3 +83 -0
- data/vendor/liburing/man/io_uring_prep_msg_ring.3 +39 -25
- data/vendor/liburing/man/io_uring_prep_multishot_accept.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_multishot_accept_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_nop.3 +28 -0
- data/vendor/liburing/man/io_uring_prep_openat.3 +117 -0
- data/vendor/liburing/man/io_uring_prep_openat2.3 +117 -0
- data/vendor/liburing/man/io_uring_prep_openat2_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_openat_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_poll_add.3 +72 -0
- data/vendor/liburing/man/io_uring_prep_poll_multishot.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_poll_remove.3 +55 -0
- data/vendor/liburing/man/io_uring_prep_poll_update.3 +89 -0
- data/vendor/liburing/man/io_uring_prep_provide_buffers.3 +131 -0
- data/vendor/liburing/man/io_uring_prep_read.3 +33 -14
- data/vendor/liburing/man/io_uring_prep_read_fixed.3 +39 -21
- data/vendor/liburing/man/io_uring_prep_readv.3 +49 -15
- data/vendor/liburing/man/io_uring_prep_readv2.3 +49 -17
- data/vendor/liburing/man/io_uring_prep_recv.3 +105 -0
- data/vendor/liburing/man/io_uring_prep_recv_multishot.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_recvmsg.3 +124 -0
- data/vendor/liburing/man/io_uring_prep_recvmsg_multishot.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_remove_buffers.3 +52 -0
- data/vendor/liburing/man/io_uring_prep_rename.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_renameat.3 +96 -0
- data/vendor/liburing/man/io_uring_prep_send.3 +57 -0
- data/vendor/liburing/man/io_uring_prep_send_zc.3 +64 -0
- data/vendor/liburing/man/io_uring_prep_sendmsg.3 +69 -0
- data/vendor/liburing/man/io_uring_prep_shutdown.3 +53 -0
- data/vendor/liburing/man/io_uring_prep_socket.3 +118 -0
- data/vendor/liburing/man/io_uring_prep_socket_direct.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_socket_direct_alloc.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_splice.3 +80 -0
- data/vendor/liburing/man/io_uring_prep_statx.3 +74 -0
- data/vendor/liburing/man/io_uring_prep_symlink.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_symlinkat.3 +85 -0
- data/vendor/liburing/man/io_uring_prep_sync_file_range.3 +59 -0
- data/vendor/liburing/man/io_uring_prep_tee.3 +74 -0
- data/vendor/liburing/man/io_uring_prep_timeout.3 +95 -0
- data/vendor/liburing/man/io_uring_prep_timeout_remove.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_timeout_update.3 +98 -0
- data/vendor/liburing/man/io_uring_prep_unlink.3 +1 -0
- data/vendor/liburing/man/io_uring_prep_unlinkat.3 +82 -0
- data/vendor/liburing/man/io_uring_prep_write.3 +32 -15
- data/vendor/liburing/man/io_uring_prep_write_fixed.3 +39 -21
- data/vendor/liburing/man/io_uring_prep_writev.3 +50 -16
- data/vendor/liburing/man/io_uring_prep_writev2.3 +50 -17
- data/vendor/liburing/man/io_uring_queue_exit.3 +3 -4
- data/vendor/liburing/man/io_uring_queue_init.3 +58 -13
- data/vendor/liburing/man/io_uring_queue_init_params.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_cmsg_firsthdr.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_cmsg_nexthdr.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_name.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_out.3 +78 -0
- data/vendor/liburing/man/io_uring_recvmsg_payload.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_payload_length.3 +1 -0
- data/vendor/liburing/man/io_uring_recvmsg_validate.3 +1 -0
- data/vendor/liburing/man/io_uring_register.2 +153 -13
- data/vendor/liburing/man/io_uring_register_buf_ring.3 +140 -0
- data/vendor/liburing/man/io_uring_register_buffers.3 +32 -12
- data/vendor/liburing/man/io_uring_register_eventfd.3 +51 -0
- data/vendor/liburing/man/io_uring_register_eventfd_async.3 +1 -0
- data/vendor/liburing/man/io_uring_register_file_alloc_range.3 +52 -0
- data/vendor/liburing/man/io_uring_register_files.3 +33 -11
- data/vendor/liburing/man/io_uring_register_files_sparse.3 +1 -0
- data/vendor/liburing/man/io_uring_register_iowq_aff.3 +61 -0
- data/vendor/liburing/man/io_uring_register_iowq_max_workers.3 +71 -0
- data/vendor/liburing/man/io_uring_register_ring_fd.3 +49 -0
- data/vendor/liburing/man/io_uring_register_sync_cancel.3 +71 -0
- data/vendor/liburing/man/io_uring_setup.2 +119 -13
- data/vendor/liburing/man/io_uring_sq_ready.3 +14 -8
- data/vendor/liburing/man/io_uring_sq_space_left.3 +9 -9
- data/vendor/liburing/man/io_uring_sqe_set_data.3 +29 -11
- data/vendor/liburing/man/io_uring_sqe_set_data64.3 +1 -0
- data/vendor/liburing/man/io_uring_sqe_set_flags.3 +38 -11
- data/vendor/liburing/man/io_uring_sqring_wait.3 +13 -9
- data/vendor/liburing/man/io_uring_submit.3 +29 -12
- data/vendor/liburing/man/io_uring_submit_and_get_events.3 +31 -0
- data/vendor/liburing/man/io_uring_submit_and_wait.3 +16 -12
- data/vendor/liburing/man/io_uring_submit_and_wait_timeout.3 +30 -23
- data/vendor/liburing/man/io_uring_unregister_buf_ring.3 +30 -0
- data/vendor/liburing/man/io_uring_unregister_buffers.3 +11 -10
- data/vendor/liburing/man/io_uring_unregister_eventfd.3 +1 -0
- data/vendor/liburing/man/io_uring_unregister_files.3 +11 -10
- data/vendor/liburing/man/io_uring_unregister_iowq_aff.3 +1 -0
- data/vendor/liburing/man/io_uring_unregister_ring_fd.3 +32 -0
- data/vendor/liburing/man/io_uring_wait_cqe.3 +19 -12
- data/vendor/liburing/man/io_uring_wait_cqe_nr.3 +21 -14
- data/vendor/liburing/man/io_uring_wait_cqe_timeout.3 +27 -13
- data/vendor/liburing/man/io_uring_wait_cqes.3 +24 -14
- data/vendor/liburing/src/Makefile +8 -7
- data/vendor/liburing/src/arch/aarch64/lib.h +48 -0
- data/vendor/liburing/src/arch/aarch64/syscall.h +0 -4
- data/vendor/liburing/src/arch/generic/lib.h +0 -4
- data/vendor/liburing/src/arch/generic/syscall.h +29 -16
- data/vendor/liburing/src/arch/syscall-defs.h +41 -14
- data/vendor/liburing/src/arch/x86/lib.h +0 -21
- data/vendor/liburing/src/arch/x86/syscall.h +146 -10
- data/vendor/liburing/src/include/liburing/io_uring.h +245 -5
- data/vendor/liburing/src/include/liburing.h +468 -35
- data/vendor/liburing/src/int_flags.h +1 -0
- data/vendor/liburing/src/lib.h +20 -16
- data/vendor/liburing/src/liburing.map +16 -0
- data/vendor/liburing/src/nolibc.c +1 -1
- data/vendor/liburing/src/queue.c +87 -55
- data/vendor/liburing/src/register.c +129 -53
- data/vendor/liburing/src/setup.c +65 -28
- data/vendor/liburing/src/syscall.c +14 -32
- data/vendor/liburing/src/syscall.h +12 -64
- data/vendor/liburing/test/{232c93d07b74-test.c → 232c93d07b74.c} +8 -9
- data/vendor/liburing/test/{35fa71a030ca-test.c → 35fa71a030ca.c} +4 -4
- data/vendor/liburing/test/{500f9fbadef8-test.c → 500f9fbadef8.c} +7 -7
- data/vendor/liburing/test/{7ad0e4b2f83c-test.c → 7ad0e4b2f83c.c} +8 -7
- data/vendor/liburing/test/{8a9973408177-test.c → 8a9973408177.c} +4 -3
- data/vendor/liburing/test/{917257daa0fe-test.c → 917257daa0fe.c} +3 -2
- data/vendor/liburing/test/Makefile +60 -62
- data/vendor/liburing/test/{a0908ae19763-test.c → a0908ae19763.c} +3 -2
- data/vendor/liburing/test/{a4c0b3decb33-test.c → a4c0b3decb33.c} +3 -2
- data/vendor/liburing/test/accept-link.c +5 -4
- data/vendor/liburing/test/accept-reuse.c +17 -16
- data/vendor/liburing/test/accept-test.c +14 -10
- data/vendor/liburing/test/accept.c +529 -107
- data/vendor/liburing/test/across-fork.c +7 -6
- data/vendor/liburing/test/{b19062a56726-test.c → b19062a56726.c} +3 -2
- data/vendor/liburing/test/{b5837bd5311d-test.c → b5837bd5311d.c} +10 -9
- data/vendor/liburing/test/buf-ring.c +420 -0
- data/vendor/liburing/test/{ce593a6c480a-test.c → ce593a6c480a.c} +15 -12
- data/vendor/liburing/test/connect.c +8 -7
- data/vendor/liburing/test/cq-full.c +5 -4
- data/vendor/liburing/test/cq-overflow.c +242 -12
- data/vendor/liburing/test/cq-peek-batch.c +5 -4
- data/vendor/liburing/test/cq-ready.c +5 -4
- data/vendor/liburing/test/cq-size.c +5 -4
- data/vendor/liburing/test/{d4ae271dfaae-test.c → d4ae271dfaae.c} +2 -2
- data/vendor/liburing/test/{d77a67ed5f27-test.c → d77a67ed5f27.c} +6 -6
- data/vendor/liburing/test/defer-taskrun.c +336 -0
- data/vendor/liburing/test/defer.c +26 -14
- data/vendor/liburing/test/double-poll-crash.c +15 -5
- data/vendor/liburing/test/drop-submit.c +5 -3
- data/vendor/liburing/test/{eeed8b54e0df-test.c → eeed8b54e0df.c} +7 -6
- data/vendor/liburing/test/empty-eownerdead.c +4 -4
- data/vendor/liburing/test/eventfd-disable.c +48 -20
- data/vendor/liburing/test/eventfd-reg.c +10 -9
- data/vendor/liburing/test/eventfd-ring.c +13 -12
- data/vendor/liburing/test/eventfd.c +13 -12
- data/vendor/liburing/test/exit-no-cleanup.c +1 -1
- data/vendor/liburing/test/fadvise.c +3 -3
- data/vendor/liburing/test/fallocate.c +16 -9
- data/vendor/liburing/test/{fc2a85cb02ef-test.c → fc2a85cb02ef.c} +4 -3
- data/vendor/liburing/test/fd-pass.c +187 -0
- data/vendor/liburing/test/file-register.c +302 -36
- data/vendor/liburing/test/file-update.c +62 -4
- data/vendor/liburing/test/file-verify.c +6 -2
- data/vendor/liburing/test/files-exit-hang-poll.c +11 -25
- data/vendor/liburing/test/files-exit-hang-timeout.c +13 -10
- data/vendor/liburing/test/fixed-buf-iter.c +115 -0
- data/vendor/liburing/test/fixed-link.c +10 -10
- data/vendor/liburing/test/fixed-reuse.c +160 -0
- data/vendor/liburing/test/fpos.c +6 -3
- data/vendor/liburing/test/fsync.c +3 -3
- data/vendor/liburing/test/hardlink.c +10 -6
- data/vendor/liburing/test/helpers.c +137 -4
- data/vendor/liburing/test/helpers.h +27 -0
- data/vendor/liburing/test/io-cancel.c +16 -11
- data/vendor/liburing/test/io_uring_enter.c +46 -81
- data/vendor/liburing/test/io_uring_passthrough.c +451 -0
- data/vendor/liburing/test/io_uring_register.c +59 -229
- data/vendor/liburing/test/io_uring_setup.c +24 -29
- data/vendor/liburing/test/iopoll-leak.c +85 -0
- data/vendor/liburing/test/iopoll.c +16 -9
- data/vendor/liburing/test/lfs-openat-write.c +3 -1
- data/vendor/liburing/test/link-timeout.c +4 -3
- data/vendor/liburing/test/link.c +8 -7
- data/vendor/liburing/test/madvise.c +2 -2
- data/vendor/liburing/test/mkdir.c +9 -5
- data/vendor/liburing/test/msg-ring.c +46 -20
- data/vendor/liburing/test/multicqes_drain.c +51 -12
- data/vendor/liburing/test/nolibc.c +60 -0
- data/vendor/liburing/test/nop.c +78 -16
- data/vendor/liburing/test/nvme.h +168 -0
- data/vendor/liburing/test/open-direct-link.c +188 -0
- data/vendor/liburing/test/open-direct-pick.c +180 -0
- data/vendor/liburing/test/openat2.c +3 -3
- data/vendor/liburing/test/poll-cancel-all.c +472 -0
- data/vendor/liburing/test/poll-link.c +9 -18
- data/vendor/liburing/test/poll-mshot-overflow.c +162 -0
- data/vendor/liburing/test/poll-mshot-update.c +83 -33
- data/vendor/liburing/test/pollfree.c +2 -2
- data/vendor/liburing/test/read-before-exit.c +112 -0
- data/vendor/liburing/test/read-write.c +83 -1
- data/vendor/liburing/test/recv-msgall-stream.c +398 -0
- data/vendor/liburing/test/recv-msgall.c +265 -0
- data/vendor/liburing/test/recv-multishot.c +505 -0
- data/vendor/liburing/test/rename.c +2 -5
- data/vendor/liburing/test/ring-leak.c +97 -0
- data/vendor/liburing/test/ringbuf-read.c +200 -0
- data/vendor/liburing/test/rsrc_tags.c +25 -13
- data/vendor/liburing/test/runtests-quiet.sh +11 -0
- data/vendor/liburing/test/runtests.sh +18 -20
- data/vendor/liburing/test/rw_merge_test.c +3 -2
- data/vendor/liburing/test/send-zerocopy.c +684 -0
- data/vendor/liburing/test/send_recv.c +49 -2
- data/vendor/liburing/test/send_recvmsg.c +165 -55
- data/vendor/liburing/test/shutdown.c +3 -4
- data/vendor/liburing/test/sigfd-deadlock.c +22 -8
- data/vendor/liburing/test/single-issuer.c +171 -0
- data/vendor/liburing/test/socket-rw-eagain.c +2 -12
- data/vendor/liburing/test/socket-rw-offset.c +2 -11
- data/vendor/liburing/test/socket-rw.c +2 -11
- data/vendor/liburing/test/socket.c +409 -0
- data/vendor/liburing/test/sq-poll-dup.c +1 -1
- data/vendor/liburing/test/sq-poll-share.c +1 -1
- data/vendor/liburing/test/statx.c +2 -2
- data/vendor/liburing/test/submit-and-wait.c +108 -0
- data/vendor/liburing/test/submit-link-fail.c +5 -3
- data/vendor/liburing/test/submit-reuse.c +0 -2
- data/vendor/liburing/test/sync-cancel.c +235 -0
- data/vendor/liburing/test/test.h +35 -0
- data/vendor/liburing/test/timeout-overflow.c +11 -11
- data/vendor/liburing/test/timeout.c +7 -7
- data/vendor/liburing/test/tty-write-dpoll.c +60 -0
- data/vendor/liburing/test/unlink.c +1 -1
- data/vendor/liburing/test/xattr.c +425 -0
- metadata +143 -22
- data/Gemfile.lock +0 -78
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
|
2
|
+
.\"
|
|
3
|
+
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
|
4
|
+
.\"
|
|
5
|
+
.TH io_uring_prep_send 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_send \- prepare a send request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <liburing.h>
|
|
11
|
+
.PP
|
|
12
|
+
.BI "void io_uring_prep_send(struct io_uring_sqe *" sqe ","
|
|
13
|
+
.BI " int " sockfd ","
|
|
14
|
+
.BI " const void *" buf ","
|
|
15
|
+
.BI " size_t " len ","
|
|
16
|
+
.BI " int " flags ");"
|
|
17
|
+
.fi
|
|
18
|
+
.SH DESCRIPTION
|
|
19
|
+
.PP
|
|
20
|
+
The
|
|
21
|
+
.BR io_uring_prep_send (3)
|
|
22
|
+
function prepares a send request. The submission queue entry
|
|
23
|
+
.I sqe
|
|
24
|
+
is setup to use the file descriptor
|
|
25
|
+
.I sockfd
|
|
26
|
+
to start sending the data from
|
|
27
|
+
.I buf
|
|
28
|
+
of size
|
|
29
|
+
.I len
|
|
30
|
+
bytes and with modifier flags
|
|
31
|
+
.IR flags .
|
|
32
|
+
|
|
33
|
+
This function prepares an async
|
|
34
|
+
.BR send (2)
|
|
35
|
+
request. See that man page for details.
|
|
36
|
+
|
|
37
|
+
.SH RETURN VALUE
|
|
38
|
+
None
|
|
39
|
+
.SH ERRORS
|
|
40
|
+
The CQE
|
|
41
|
+
.I res
|
|
42
|
+
field will contain the result of the operation. See the related man page for
|
|
43
|
+
details on possible values. Note that where synchronous system calls will return
|
|
44
|
+
.B -1
|
|
45
|
+
on failure and set
|
|
46
|
+
.I errno
|
|
47
|
+
to the actual error value, io_uring never uses
|
|
48
|
+
.IR errno .
|
|
49
|
+
Instead it returns the negated
|
|
50
|
+
.I errno
|
|
51
|
+
directly in the CQE
|
|
52
|
+
.I res
|
|
53
|
+
field.
|
|
54
|
+
.SH SEE ALSO
|
|
55
|
+
.BR io_uring_get_sqe (3),
|
|
56
|
+
.BR io_uring_submit (3),
|
|
57
|
+
.BR send (2)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
|
2
|
+
.\"
|
|
3
|
+
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
|
4
|
+
.\"
|
|
5
|
+
.TH io_uring_prep_send_zc 3 "September 6, 2022" "liburing-2.3" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_send_zc \- prepare a zerocopy send request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <liburing.h>
|
|
11
|
+
.PP
|
|
12
|
+
.BI "void io_uring_prep_send_zc(struct io_uring_sqe *" sqe ","
|
|
13
|
+
.BI " int " sockfd ","
|
|
14
|
+
.BI " const void *" buf ","
|
|
15
|
+
.BI " size_t " len ","
|
|
16
|
+
.BI " int " flags ","
|
|
17
|
+
.BI " int " zc_flags ");"
|
|
18
|
+
.fi
|
|
19
|
+
.SH DESCRIPTION
|
|
20
|
+
.PP
|
|
21
|
+
The
|
|
22
|
+
.BR io_uring_prep_send_zc (3)
|
|
23
|
+
function prepares a zerocopy send request. The submission queue entry
|
|
24
|
+
.I sqe
|
|
25
|
+
is setup to use the file descriptor
|
|
26
|
+
.I sockfd
|
|
27
|
+
to start sending the data from
|
|
28
|
+
.I buf
|
|
29
|
+
of size
|
|
30
|
+
.I len
|
|
31
|
+
bytes with send modifier flags
|
|
32
|
+
.IR flags
|
|
33
|
+
and zerocopy modifier flags
|
|
34
|
+
.IR zc_flags .
|
|
35
|
+
|
|
36
|
+
This function prepares an async zerocopy
|
|
37
|
+
.BR send (2)
|
|
38
|
+
request. See that man page for details. For details on the zerocopy nature
|
|
39
|
+
of it, see
|
|
40
|
+
.BR io_uring_enter (2) .
|
|
41
|
+
|
|
42
|
+
.SH RETURN VALUE
|
|
43
|
+
None
|
|
44
|
+
.SH ERRORS
|
|
45
|
+
The CQE
|
|
46
|
+
.I res
|
|
47
|
+
field will contain the result of the operation. See the related man page for
|
|
48
|
+
details on possible values. Note that where synchronous system calls will return
|
|
49
|
+
.B -1
|
|
50
|
+
on failure and set
|
|
51
|
+
.I errno
|
|
52
|
+
to the actual error value, io_uring never uses
|
|
53
|
+
.IR errno .
|
|
54
|
+
Instead it returns the negated
|
|
55
|
+
.I errno
|
|
56
|
+
directly in the CQE
|
|
57
|
+
.I res
|
|
58
|
+
field.
|
|
59
|
+
.SH SEE ALSO
|
|
60
|
+
.BR io_uring_get_sqe (3),
|
|
61
|
+
.BR io_uring_submit (3),
|
|
62
|
+
.BR io_uring_prep_send (3),
|
|
63
|
+
.BR io_uring_enter (2),
|
|
64
|
+
.BR send (2)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
|
2
|
+
.\"
|
|
3
|
+
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
|
4
|
+
.\"
|
|
5
|
+
.TH io_uring_prep_sendmsg 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_sendmsg \- prepare a sendmsg request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <sys/types.h>
|
|
11
|
+
.B #include <sys/socket.h>
|
|
12
|
+
.B #include <liburing.h>
|
|
13
|
+
.PP
|
|
14
|
+
.BI "void io_uring_prep_sendmsg(struct io_uring_sqe *" sqe ","
|
|
15
|
+
.BI " int " fd ","
|
|
16
|
+
.BI " const struct msghdr *" msg ","
|
|
17
|
+
.BI " unsigned " flags ");"
|
|
18
|
+
.fi
|
|
19
|
+
.SH DESCRIPTION
|
|
20
|
+
.PP
|
|
21
|
+
The
|
|
22
|
+
.BR io_uring_prep_sendmsg (3)
|
|
23
|
+
function prepares a sendmsg request. The submission queue entry
|
|
24
|
+
.I sqe
|
|
25
|
+
is setup to use the file descriptor
|
|
26
|
+
.I fd
|
|
27
|
+
to start sending the data indicated by
|
|
28
|
+
.I msg
|
|
29
|
+
with the
|
|
30
|
+
.BR sendmsg (2)
|
|
31
|
+
defined flags in the
|
|
32
|
+
.I flags
|
|
33
|
+
argument.
|
|
34
|
+
|
|
35
|
+
This function prepares an async
|
|
36
|
+
.BR sendmsg (2)
|
|
37
|
+
request. See that man page for details.
|
|
38
|
+
|
|
39
|
+
.SH RETURN VALUE
|
|
40
|
+
None
|
|
41
|
+
.SH ERRORS
|
|
42
|
+
The CQE
|
|
43
|
+
.I res
|
|
44
|
+
field will contain the result of the operation. See the related man page for
|
|
45
|
+
details on possible values. Note that where synchronous system calls will return
|
|
46
|
+
.B -1
|
|
47
|
+
on failure and set
|
|
48
|
+
.I errno
|
|
49
|
+
to the actual error value, io_uring never uses
|
|
50
|
+
.IR errno .
|
|
51
|
+
Instead it returns the negated
|
|
52
|
+
.I errno
|
|
53
|
+
directly in the CQE
|
|
54
|
+
.I res
|
|
55
|
+
field.
|
|
56
|
+
.SH NOTES
|
|
57
|
+
As with any request that passes in data in a struct, that data must remain
|
|
58
|
+
valid until the request has been successfully submitted. It need not remain
|
|
59
|
+
valid until completion. Once a request has been submitted, the in-kernel
|
|
60
|
+
state is stable. Very early kernels (5.4 and earlier) required state to be
|
|
61
|
+
stable until the completion occurred. Applications can test for this
|
|
62
|
+
behavior by inspecting the
|
|
63
|
+
.B IORING_FEAT_SUBMIT_STABLE
|
|
64
|
+
flag passed back from
|
|
65
|
+
.BR io_uring_queue_init_params (3).
|
|
66
|
+
.SH SEE ALSO
|
|
67
|
+
.BR io_uring_get_sqe (3),
|
|
68
|
+
.BR io_uring_submit (3),
|
|
69
|
+
.BR sendmsg (2)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
|
2
|
+
.\"
|
|
3
|
+
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
|
4
|
+
.\"
|
|
5
|
+
.TH io_uring_prep_shutdown 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_shutdown \- prepare a shutdown request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <sys/socket.h>
|
|
11
|
+
.B #include <liburing.h>
|
|
12
|
+
.PP
|
|
13
|
+
.BI "void io_uring_prep_shutdown(struct io_uring_sqe *" sqe ","
|
|
14
|
+
.BI " int " sockfd ","
|
|
15
|
+
.BI " int " how ");"
|
|
16
|
+
.fi
|
|
17
|
+
.SH DESCRIPTION
|
|
18
|
+
.PP
|
|
19
|
+
The
|
|
20
|
+
.BR io_uring_prep_shutdown (3)
|
|
21
|
+
function prepares a shutdown request. The submission queue entry
|
|
22
|
+
.I sqe
|
|
23
|
+
is setup to use the file descriptor
|
|
24
|
+
.I sockfd
|
|
25
|
+
that should be shutdown with the
|
|
26
|
+
.I how
|
|
27
|
+
argument.
|
|
28
|
+
|
|
29
|
+
This function prepares an async
|
|
30
|
+
.BR shutdown (2)
|
|
31
|
+
request. See that man page for details.
|
|
32
|
+
|
|
33
|
+
.SH RETURN VALUE
|
|
34
|
+
None
|
|
35
|
+
.SH ERRORS
|
|
36
|
+
The CQE
|
|
37
|
+
.I res
|
|
38
|
+
field will contain the result of the operation. See the related man page for
|
|
39
|
+
details on possible values. Note that where synchronous system calls will return
|
|
40
|
+
.B -1
|
|
41
|
+
on failure and set
|
|
42
|
+
.I errno
|
|
43
|
+
to the actual error value, io_uring never uses
|
|
44
|
+
.IR errno .
|
|
45
|
+
Instead it returns the negated
|
|
46
|
+
.I errno
|
|
47
|
+
directly in the CQE
|
|
48
|
+
.I res
|
|
49
|
+
field.
|
|
50
|
+
.SH SEE ALSO
|
|
51
|
+
.BR io_uring_get_sqe (3),
|
|
52
|
+
.BR io_uring_submit (3),
|
|
53
|
+
.BR shutdown (2)
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
|
2
|
+
.\"
|
|
3
|
+
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
|
4
|
+
.\"
|
|
5
|
+
.TH io_uring_prep_socket 3 "May 27, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_socket \- prepare a socket creation request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <sys/socket.h>
|
|
11
|
+
.B #include <liburing.h>
|
|
12
|
+
.PP
|
|
13
|
+
.BI "void io_uring_prep_socket(struct io_uring_sqe *" sqe ","
|
|
14
|
+
.BI " int " domain ","
|
|
15
|
+
.BI " int " type ","
|
|
16
|
+
.BI " int " protocol ","
|
|
17
|
+
.BI " unsigned int " flags ");"
|
|
18
|
+
.PP
|
|
19
|
+
.BI "void io_uring_prep_socket_direct(struct io_uring_sqe *" sqe ","
|
|
20
|
+
.BI " int " domain ","
|
|
21
|
+
.BI " int " type ","
|
|
22
|
+
.BI " int " protocol ","
|
|
23
|
+
.BI " unsigned int " file_index ","
|
|
24
|
+
.BI " unsigned int " flags ");"
|
|
25
|
+
.PP
|
|
26
|
+
.BI "void io_uring_prep_socket_direct_alloc(struct io_uring_sqe *" sqe ","
|
|
27
|
+
.BI " int " domain ","
|
|
28
|
+
.BI " int " type ","
|
|
29
|
+
.BI " int " protocol ","
|
|
30
|
+
.BI " unsigned int " flags ");"
|
|
31
|
+
.fi
|
|
32
|
+
.SH DESCRIPTION
|
|
33
|
+
.PP
|
|
34
|
+
The
|
|
35
|
+
.BR io_uring_prep_socket (3)
|
|
36
|
+
function prepares a socket creation request. The submission queue entry
|
|
37
|
+
.I sqe
|
|
38
|
+
is setup to use the communication domain defined by
|
|
39
|
+
.I domain
|
|
40
|
+
and use the communication type defined by
|
|
41
|
+
.I type
|
|
42
|
+
and the protocol set by
|
|
43
|
+
.IR protocol .
|
|
44
|
+
The
|
|
45
|
+
.I flags
|
|
46
|
+
argument are currently unused.
|
|
47
|
+
|
|
48
|
+
The
|
|
49
|
+
.BR io_uring_prep_socket_direct (3)
|
|
50
|
+
helper works just like
|
|
51
|
+
.BR io_uring_prep_socket (3),
|
|
52
|
+
except it maps the socket to a direct descriptor rather than return a normal
|
|
53
|
+
file descriptor. The
|
|
54
|
+
.I file_index
|
|
55
|
+
argument should be set to the slot that should be used for this socket.
|
|
56
|
+
|
|
57
|
+
The
|
|
58
|
+
.BR io_uring_prep_socket_direct_alloc (3)
|
|
59
|
+
helper works just like
|
|
60
|
+
.BR io_uring_prep_socket_alloc (3),
|
|
61
|
+
except it allocates a new direct descriptor rather than pass a free slot in. It
|
|
62
|
+
is equivalent to using
|
|
63
|
+
.BR io_uring_prep_socket_direct (3)
|
|
64
|
+
with
|
|
65
|
+
.B IORING_FILE_INDEX_ALLOC
|
|
66
|
+
as the
|
|
67
|
+
.I
|
|
68
|
+
file_index .
|
|
69
|
+
Upon completion, the
|
|
70
|
+
.I res
|
|
71
|
+
field of the CQE will return the direct slot that was allocated for the
|
|
72
|
+
socket.
|
|
73
|
+
|
|
74
|
+
If the direct variants are used, the application must first have registered
|
|
75
|
+
a file table using
|
|
76
|
+
.BR io_uring_register_files (3)
|
|
77
|
+
of the appropriate size. Once registered, a direct socket request may use any
|
|
78
|
+
entry in that table, as long as it is within the size of the registered table.
|
|
79
|
+
If a specified entry already contains a file, the file will first be removed
|
|
80
|
+
from the table and closed. It's consistent with the behavior of updating an
|
|
81
|
+
existing file with
|
|
82
|
+
.BR io_uring_register_files_update (3).
|
|
83
|
+
|
|
84
|
+
For a direct descriptor socket request, the
|
|
85
|
+
.I file_index
|
|
86
|
+
argument can be set to
|
|
87
|
+
.BR IORING_FILE_INDEX_ALLOC ,
|
|
88
|
+
In this case a free entry in io_uring file table will
|
|
89
|
+
be used automatically and the file index will be returned as CQE
|
|
90
|
+
.IR res .
|
|
91
|
+
.B -ENFILE
|
|
92
|
+
is otherwise returned if there is no free entries in the io_uring file table.
|
|
93
|
+
|
|
94
|
+
These functions prepare an async
|
|
95
|
+
.BR socket (2)
|
|
96
|
+
request. See that man page for details.
|
|
97
|
+
|
|
98
|
+
.SH RETURN VALUE
|
|
99
|
+
None
|
|
100
|
+
.SH ERRORS
|
|
101
|
+
The CQE
|
|
102
|
+
.I res
|
|
103
|
+
field will contain the result of the operation. See the related man page for
|
|
104
|
+
details on possible values. Note that where synchronous system calls will return
|
|
105
|
+
.B -1
|
|
106
|
+
on failure and set
|
|
107
|
+
.I errno
|
|
108
|
+
to the actual error value, io_uring never uses
|
|
109
|
+
.IR errno .
|
|
110
|
+
Instead it returns the negated
|
|
111
|
+
.I errno
|
|
112
|
+
directly in the CQE
|
|
113
|
+
.I res
|
|
114
|
+
field.
|
|
115
|
+
.SH SEE ALSO
|
|
116
|
+
.BR io_uring_get_sqe (3),
|
|
117
|
+
.BR io_uring_submit (3),
|
|
118
|
+
.BR socket (2)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
io_uring_prep_socket.3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
io_uring_prep_socket.3
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
|
2
|
+
.\"
|
|
3
|
+
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
|
4
|
+
.\"
|
|
5
|
+
.TH io_uring_prep_splice 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_splice \- prepare an splice request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <fcntl.h>
|
|
11
|
+
.B #include <liburing.h>
|
|
12
|
+
.PP
|
|
13
|
+
.BI "void io_uring_prep_splice(struct io_uring_sqe *" sqe ","
|
|
14
|
+
.BI " int " fd_in ","
|
|
15
|
+
.BI " int64_t " off_in ","
|
|
16
|
+
.BI " int " fd_out ","
|
|
17
|
+
.BI " int64_t " off_out ","
|
|
18
|
+
.BI " unsigned int " nbytes ","
|
|
19
|
+
.BI " unsigned int " splice_flags ");"
|
|
20
|
+
.fi
|
|
21
|
+
.SH DESCRIPTION
|
|
22
|
+
.PP
|
|
23
|
+
The
|
|
24
|
+
.BR io_uring_prep_splice (3)
|
|
25
|
+
function prepares a splice request. The submission queue entry
|
|
26
|
+
.I sqe
|
|
27
|
+
is setup to use as input the file descriptor
|
|
28
|
+
.I fd_in
|
|
29
|
+
at offset
|
|
30
|
+
.IR off_in ,
|
|
31
|
+
splicing data to the file descriptor at
|
|
32
|
+
.I fd_out
|
|
33
|
+
and at offset
|
|
34
|
+
.IR off_out .
|
|
35
|
+
.I nbytes
|
|
36
|
+
bytes of data should be spliced between the two descriptors.
|
|
37
|
+
.I splice_flags
|
|
38
|
+
are modifier flags for the operation. See
|
|
39
|
+
.BR splice (2)
|
|
40
|
+
for the generic splice flags.
|
|
41
|
+
|
|
42
|
+
If the
|
|
43
|
+
.I fd_out
|
|
44
|
+
descriptor,
|
|
45
|
+
.B IOSQE_FIXED_FILE
|
|
46
|
+
can be set in the SQE to indicate that. For the input file, the io_uring
|
|
47
|
+
specific
|
|
48
|
+
.B SPLICE_F_FD_IN_FIXED
|
|
49
|
+
can be set in
|
|
50
|
+
.I splice_flags
|
|
51
|
+
and
|
|
52
|
+
.I fd_in
|
|
53
|
+
given as a registered file descriptor offset.
|
|
54
|
+
|
|
55
|
+
This function prepares an async
|
|
56
|
+
.BR splice (2)
|
|
57
|
+
request. See that man page for details.
|
|
58
|
+
|
|
59
|
+
.SH RETURN VALUE
|
|
60
|
+
None
|
|
61
|
+
.SH ERRORS
|
|
62
|
+
The CQE
|
|
63
|
+
.I res
|
|
64
|
+
field will contain the result of the operation. See the related man page for
|
|
65
|
+
details on possible values. Note that where synchronous system calls will return
|
|
66
|
+
.B -1
|
|
67
|
+
on failure and set
|
|
68
|
+
.I errno
|
|
69
|
+
to the actual error value, io_uring never uses
|
|
70
|
+
.IR errno .
|
|
71
|
+
Instead it returns the negated
|
|
72
|
+
.I errno
|
|
73
|
+
directly in the CQE
|
|
74
|
+
.I res
|
|
75
|
+
field.
|
|
76
|
+
.SH SEE ALSO
|
|
77
|
+
.BR io_uring_get_sqe (3),
|
|
78
|
+
.BR io_uring_submit (3),
|
|
79
|
+
.BR io_uring_register (2),
|
|
80
|
+
.BR splice (2)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
|
2
|
+
.\"
|
|
3
|
+
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
|
4
|
+
.\"
|
|
5
|
+
.TH io_uring_prep_statx 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_statx \- prepare a statx request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <sys/types.h>
|
|
11
|
+
.B #include <sys/stat.h>
|
|
12
|
+
.B #include <unistd.h>
|
|
13
|
+
.B #include <fcntl.h>
|
|
14
|
+
.B #include <liburing.h>
|
|
15
|
+
.PP
|
|
16
|
+
.BI "void io_uring_prep_statx(struct io_uring_sqe *" sqe ","
|
|
17
|
+
.BI " int " dirfd ","
|
|
18
|
+
.BI " const char *" path ","
|
|
19
|
+
.BI " int " flags ","
|
|
20
|
+
.BI " unsigned " mask ","
|
|
21
|
+
.BI " struct statx *" statxbuf ");"
|
|
22
|
+
.fi
|
|
23
|
+
.SH DESCRIPTION
|
|
24
|
+
.PP
|
|
25
|
+
The
|
|
26
|
+
.BR io_uring_prep_statx (3)
|
|
27
|
+
function prepares a statx request. The submission queue entry
|
|
28
|
+
.I sqe
|
|
29
|
+
is setup to use the directory file descriptor pointed to by
|
|
30
|
+
.I dirfd
|
|
31
|
+
to start a statx operation on the path identified by
|
|
32
|
+
.I path
|
|
33
|
+
and using the flags given in
|
|
34
|
+
.I flags
|
|
35
|
+
for the fields specified by
|
|
36
|
+
.I mask
|
|
37
|
+
and into the buffer located at
|
|
38
|
+
.IR statxbuf .
|
|
39
|
+
|
|
40
|
+
This function prepares an async
|
|
41
|
+
.BR statx (2)
|
|
42
|
+
request. See that man page for details.
|
|
43
|
+
|
|
44
|
+
.SH RETURN VALUE
|
|
45
|
+
None
|
|
46
|
+
.SH ERRORS
|
|
47
|
+
The CQE
|
|
48
|
+
.I res
|
|
49
|
+
field will contain the result of the operation. See the related man page for
|
|
50
|
+
details on possible values. Note that where synchronous system calls will return
|
|
51
|
+
.B -1
|
|
52
|
+
on failure and set
|
|
53
|
+
.I errno
|
|
54
|
+
to the actual error value, io_uring never uses
|
|
55
|
+
.IR errno .
|
|
56
|
+
Instead it returns the negated
|
|
57
|
+
.I errno
|
|
58
|
+
directly in the CQE
|
|
59
|
+
.I res
|
|
60
|
+
field.
|
|
61
|
+
.SH NOTES
|
|
62
|
+
As with any request that passes in data in a struct, that data must remain
|
|
63
|
+
valid until the request has been successfully submitted. It need not remain
|
|
64
|
+
valid until completion. Once a request has been submitted, the in-kernel
|
|
65
|
+
state is stable. Very early kernels (5.4 and earlier) required state to be
|
|
66
|
+
stable until the completion occurred. Applications can test for this
|
|
67
|
+
behavior by inspecting the
|
|
68
|
+
.B IORING_FEAT_SUBMIT_STABLE
|
|
69
|
+
flag passed back from
|
|
70
|
+
.BR io_uring_queue_init_params (3).
|
|
71
|
+
.SH SEE ALSO
|
|
72
|
+
.BR io_uring_get_sqe (3),
|
|
73
|
+
.BR io_uring_submit (3),
|
|
74
|
+
.BR statx (2)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
io_uring_prep_symlinkat.3
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
|
2
|
+
.\"
|
|
3
|
+
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
|
4
|
+
.\"
|
|
5
|
+
.TH io_uring_prep_symlinkat 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_symlinkat \- prepare a symlinkat request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <fcntl.h>
|
|
11
|
+
.B #include <unistd.h>
|
|
12
|
+
.B #include <liburing.h>
|
|
13
|
+
.PP
|
|
14
|
+
.BI "void io_uring_prep_symlinkat(struct io_uring_sqe *" sqe ","
|
|
15
|
+
.BI " const char *" target ","
|
|
16
|
+
.BI " int " newdirfd ","
|
|
17
|
+
.BI " const char *" linkpath ");"
|
|
18
|
+
.PP
|
|
19
|
+
.BI "void io_uring_prep_symlink(struct io_uring_sqe *" sqe ","
|
|
20
|
+
.BI " const char *" target ","
|
|
21
|
+
.BI " const char *" linkpath ");"
|
|
22
|
+
.fi
|
|
23
|
+
.SH DESCRIPTION
|
|
24
|
+
.PP
|
|
25
|
+
The
|
|
26
|
+
.BR io_uring_prep_symlinkat (3)
|
|
27
|
+
function prepares a symlinkat request. The submission queue entry
|
|
28
|
+
.I sqe
|
|
29
|
+
is setup to symlink the target path pointed to by
|
|
30
|
+
.I target
|
|
31
|
+
to the new destination indicated by
|
|
32
|
+
.I newdirfd
|
|
33
|
+
and
|
|
34
|
+
.IR linkpath .
|
|
35
|
+
|
|
36
|
+
The
|
|
37
|
+
.BR io_uring_prep_symlink (3)
|
|
38
|
+
function prepares a symlink request. The submission queue entry
|
|
39
|
+
.I sqe
|
|
40
|
+
is setup to symlink the target path pointed to by
|
|
41
|
+
.I target
|
|
42
|
+
to the new destination indicated by
|
|
43
|
+
.I linkpath
|
|
44
|
+
relative to the the current working directory. This function prepares an async
|
|
45
|
+
.BR symlink (2)
|
|
46
|
+
request. See that man page for details.
|
|
47
|
+
|
|
48
|
+
These functions prepare an async
|
|
49
|
+
.BR symlinkat (2)
|
|
50
|
+
or
|
|
51
|
+
.BR symlink (2)
|
|
52
|
+
request. See those man pages for details.
|
|
53
|
+
|
|
54
|
+
.SH RETURN VALUE
|
|
55
|
+
None
|
|
56
|
+
.SH ERRORS
|
|
57
|
+
The CQE
|
|
58
|
+
.I res
|
|
59
|
+
field will contain the result of the operation. See the related man page for
|
|
60
|
+
details on possible values. Note that where synchronous system calls will return
|
|
61
|
+
.B -1
|
|
62
|
+
on failure and set
|
|
63
|
+
.I errno
|
|
64
|
+
to the actual error value, io_uring never uses
|
|
65
|
+
.IR errno .
|
|
66
|
+
Instead it returns the negated
|
|
67
|
+
.I errno
|
|
68
|
+
directly in the CQE
|
|
69
|
+
.I res
|
|
70
|
+
field.
|
|
71
|
+
.SH NOTES
|
|
72
|
+
As with any request that passes in data in a struct, that data must remain
|
|
73
|
+
valid until the request has been successfully submitted. It need not remain
|
|
74
|
+
valid until completion. Once a request has been submitted, the in-kernel
|
|
75
|
+
state is stable. Very early kernels (5.4 and earlier) required state to be
|
|
76
|
+
stable until the completion occurred. Applications can test for this
|
|
77
|
+
behavior by inspecting the
|
|
78
|
+
.B IORING_FEAT_SUBMIT_STABLE
|
|
79
|
+
flag passed back from
|
|
80
|
+
.BR io_uring_queue_init_params (3).
|
|
81
|
+
.SH SEE ALSO
|
|
82
|
+
.BR io_uring_get_sqe (3),
|
|
83
|
+
.BR io_uring_submit (3),
|
|
84
|
+
.BR symlinkat (2),
|
|
85
|
+
.BR symlink (2)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
|
|
2
|
+
.\"
|
|
3
|
+
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
|
4
|
+
.\"
|
|
5
|
+
.TH io_uring_prep_sync_file_range 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_sync_file_range \- prepare a sync_file_range request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <fcntl.h>
|
|
11
|
+
.B #include <liburing.h>
|
|
12
|
+
.PP
|
|
13
|
+
.BI "void io_uring_prep_sync_file_range(struct io_uring_sqe *" sqe ","
|
|
14
|
+
.BI " int " fd ","
|
|
15
|
+
.BI " unsigned " len ","
|
|
16
|
+
.BI " __u64 " offset ","
|
|
17
|
+
.BI " int " flags ");"
|
|
18
|
+
.fi
|
|
19
|
+
.SH DESCRIPTION
|
|
20
|
+
.PP
|
|
21
|
+
The
|
|
22
|
+
.BR io_uring_prep_sync_file_range (3)
|
|
23
|
+
function prepares a sync_file_range request. The submission queue entry
|
|
24
|
+
.I sqe
|
|
25
|
+
is setup to use the file descriptor
|
|
26
|
+
.I fd
|
|
27
|
+
that should get
|
|
28
|
+
.I len
|
|
29
|
+
bytes synced started at offset
|
|
30
|
+
.I offset
|
|
31
|
+
and with modifier flags in the
|
|
32
|
+
.I flags
|
|
33
|
+
argument.
|
|
34
|
+
|
|
35
|
+
This function prepares an async
|
|
36
|
+
.BR sync_file_range (2)
|
|
37
|
+
request. See that man page for details on the arguments.
|
|
38
|
+
|
|
39
|
+
.SH RETURN VALUE
|
|
40
|
+
None
|
|
41
|
+
.SH ERRORS
|
|
42
|
+
The CQE
|
|
43
|
+
.I res
|
|
44
|
+
field will contain the result of the operation. See the related man page for
|
|
45
|
+
details on possible values. Note that where synchronous system calls will return
|
|
46
|
+
.B -1
|
|
47
|
+
on failure and set
|
|
48
|
+
.I errno
|
|
49
|
+
to the actual error value, io_uring never uses
|
|
50
|
+
.IR errno .
|
|
51
|
+
Instead it returns the negated
|
|
52
|
+
.I errno
|
|
53
|
+
directly in the CQE
|
|
54
|
+
.I res
|
|
55
|
+
field.
|
|
56
|
+
.SH SEE ALSO
|
|
57
|
+
.BR io_uring_get_sqe (3),
|
|
58
|
+
.BR io_uring_submit (3),
|
|
59
|
+
.BR sync_file_range (2)
|