polyphony 0.94 → 0.96
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 +3 -3
- data/.github/workflows/test_io_uring.yml +4 -4
- data/.gitignore +3 -3
- data/CHANGELOG.md +19 -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/examples/adapters/redis_blpop.rb +4 -3
- data/examples/adapters/redis_channels.rb +16 -7
- data/examples/core/await.rb +1 -1
- data/examples/io/readline.rb +19 -0
- data/ext/polyphony/backend_common.c +25 -3
- data/ext/polyphony/backend_io_uring.c +18 -16
- data/ext/polyphony/backend_libev.c +2 -2
- 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/adapters/readline.rb +6 -4
- data/lib/polyphony/adapters/redis.rb +28 -87
- data/lib/polyphony/core/channel.rb +15 -0
- data/lib/polyphony/core/sync.rb +4 -0
- data/lib/polyphony/debugger.rb +2 -2
- data/lib/polyphony/extensions/socket.rb +2 -0
- data/lib/polyphony/version.rb +1 -1
- data/lib/polyphony.rb +4 -0
- data/polyphony.gemspec +10 -10
- data/test/helper.rb +0 -5
- data/test/test_backend.rb +5 -1
- data/test/test_enumerator.rb +46 -0
- data/test/test_ext.rb +63 -0
- data/test/test_io.rb +241 -216
- data/test/test_socket.rb +1 -1
- data/test/test_thread_pool.rb +5 -5
- 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 +160 -52
- data/Gemfile.lock +0 -78
|
@@ -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_fadvise 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_fadvise \- prepare a fadvise request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <fcntl.h>
|
|
11
|
+
.B #include <liburing.h>
|
|
12
|
+
.PP
|
|
13
|
+
.BI "void io_uring_prep_fadvise(struct io_uring_sqe *" sqe ","
|
|
14
|
+
.BI " int " fd ","
|
|
15
|
+
.BI " __u64 " offset ","
|
|
16
|
+
.BI " off_t " len ","
|
|
17
|
+
.BI " int " advice ");"
|
|
18
|
+
.fi
|
|
19
|
+
.SH DESCRIPTION
|
|
20
|
+
.PP
|
|
21
|
+
The
|
|
22
|
+
.BR io_uring_prep_fadvise (3)
|
|
23
|
+
function prepares an fadvise request. The submission queue entry
|
|
24
|
+
.I sqe
|
|
25
|
+
is setup to use the file descriptor pointed to by
|
|
26
|
+
.I fd
|
|
27
|
+
to start an fadvise operation at
|
|
28
|
+
.I offset
|
|
29
|
+
and of
|
|
30
|
+
.I len
|
|
31
|
+
length in bytes, giving it the advise located in
|
|
32
|
+
.IR advice .
|
|
33
|
+
|
|
34
|
+
This function prepares an async
|
|
35
|
+
.BR posix_fadvise (2)
|
|
36
|
+
request. See that man page for details.
|
|
37
|
+
|
|
38
|
+
.SH RETURN VALUE
|
|
39
|
+
None
|
|
40
|
+
.SH ERRORS
|
|
41
|
+
The CQE
|
|
42
|
+
.I res
|
|
43
|
+
field will contain the result of the operation. See the related man page for
|
|
44
|
+
details on possible values. Note that where synchronous system calls will return
|
|
45
|
+
.B -1
|
|
46
|
+
on failure and set
|
|
47
|
+
.I errno
|
|
48
|
+
to the actual error value, io_uring never uses
|
|
49
|
+
.IR errno .
|
|
50
|
+
Instead it returns the negated
|
|
51
|
+
.I errno
|
|
52
|
+
directly in the CQE
|
|
53
|
+
.I res
|
|
54
|
+
field.
|
|
55
|
+
.SH SEE ALSO
|
|
56
|
+
.BR io_uring_get_sqe (3),
|
|
57
|
+
.BR io_uring_submit (3),
|
|
58
|
+
.BR io_uring_register (2),
|
|
59
|
+
.BR posix_fadvise (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_fallocate 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_fallocate \- prepare a fallocate request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <fcntl.h>
|
|
11
|
+
.B #include <liburing.h>
|
|
12
|
+
.PP
|
|
13
|
+
.BI "void io_uring_prep_fallocate(struct io_uring_sqe *" sqe ","
|
|
14
|
+
.BI " int " fd ","
|
|
15
|
+
.BI " int " mode ","
|
|
16
|
+
.BI " off_t " offset ","
|
|
17
|
+
.BI " off_t " len ");"
|
|
18
|
+
.fi
|
|
19
|
+
.SH DESCRIPTION
|
|
20
|
+
.PP
|
|
21
|
+
The
|
|
22
|
+
.BR io_uring_prep_fallocate (3)
|
|
23
|
+
function prepares a fallocate request. The submission queue entry
|
|
24
|
+
.I sqe
|
|
25
|
+
is setup to use the file descriptor pointed to by
|
|
26
|
+
.I fd
|
|
27
|
+
to start a fallocate operation described by
|
|
28
|
+
.I mode
|
|
29
|
+
at offset
|
|
30
|
+
.I offset
|
|
31
|
+
and
|
|
32
|
+
.I len
|
|
33
|
+
length in bytes.
|
|
34
|
+
|
|
35
|
+
This function prepares an async
|
|
36
|
+
.BR fallocate (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 SEE ALSO
|
|
57
|
+
.BR io_uring_get_sqe (3),
|
|
58
|
+
.BR io_uring_submit (3),
|
|
59
|
+
.BR fallocate (2)
|
|
@@ -0,0 +1,92 @@
|
|
|
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_files_update 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_files_update \- prepare a registered file update request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <liburing.h>
|
|
11
|
+
.PP
|
|
12
|
+
.BI "void io_uring_prep_files_update(struct io_uring_sqe *" sqe ","
|
|
13
|
+
.BI " int *" fds ","
|
|
14
|
+
.BI " unsigned " nr_fds ","
|
|
15
|
+
.BI " int " offset ");"
|
|
16
|
+
.fi
|
|
17
|
+
.SH DESCRIPTION
|
|
18
|
+
.PP
|
|
19
|
+
The
|
|
20
|
+
.BR io_uring_prep_files_update (3)
|
|
21
|
+
function prepares a request for updating a number of previously registered file
|
|
22
|
+
descriptors. The submission queue entry
|
|
23
|
+
.I sqe
|
|
24
|
+
is setup to use the file descriptor array pointed to by
|
|
25
|
+
.I fds
|
|
26
|
+
and of
|
|
27
|
+
.I nr_fds
|
|
28
|
+
in length to update that amount of previously registered files starting at
|
|
29
|
+
offset
|
|
30
|
+
.IR offset .
|
|
31
|
+
|
|
32
|
+
Once a previously registered file is updated with a new one, the existing
|
|
33
|
+
entry is updated and then removed from the table. This operation is equivalent to
|
|
34
|
+
first unregistering that entry and then inserting a new one, just bundled into
|
|
35
|
+
one combined operation.
|
|
36
|
+
|
|
37
|
+
If
|
|
38
|
+
.I offset
|
|
39
|
+
is specified as IORING_FILE_INDEX_ALLOC, io_uring will allocate free direct
|
|
40
|
+
descriptors instead of having the application to pass, and store allocated
|
|
41
|
+
direct descriptors into
|
|
42
|
+
.I fds
|
|
43
|
+
array,
|
|
44
|
+
.I cqe->res
|
|
45
|
+
will return the number of direct descriptors allocated.
|
|
46
|
+
|
|
47
|
+
.SH RETURN VALUE
|
|
48
|
+
None
|
|
49
|
+
.SH ERRORS
|
|
50
|
+
These are the errors that are reported in the CQE
|
|
51
|
+
.I res
|
|
52
|
+
field. On success,
|
|
53
|
+
.I res
|
|
54
|
+
will contain the number of successfully updated file descriptors. On error,
|
|
55
|
+
the following errors can occur.
|
|
56
|
+
.TP
|
|
57
|
+
.B -ENOMEM
|
|
58
|
+
The kernel was unable to allocate memory for the request.
|
|
59
|
+
.TP
|
|
60
|
+
.B -EINVAL
|
|
61
|
+
One of the fields set in the SQE was invalid.
|
|
62
|
+
.TP
|
|
63
|
+
.B -EFAULT
|
|
64
|
+
The kernel was unable to copy in the memory pointed to by
|
|
65
|
+
.IR fds .
|
|
66
|
+
.TP
|
|
67
|
+
.B -EBADF
|
|
68
|
+
On of the descriptors located in
|
|
69
|
+
.I fds
|
|
70
|
+
didn't refer to a valid file descriptor, or one of the file descriptors in
|
|
71
|
+
the array referred to an io_uring instance.
|
|
72
|
+
.TP
|
|
73
|
+
.B -EOVERFLOW
|
|
74
|
+
The product of
|
|
75
|
+
.I offset
|
|
76
|
+
and
|
|
77
|
+
.I nr_fds
|
|
78
|
+
exceed the valid amount or overflowed.
|
|
79
|
+
.SH NOTES
|
|
80
|
+
As with any request that passes in data in a struct, that data must remain
|
|
81
|
+
valid until the request has been successfully submitted. It need not remain
|
|
82
|
+
valid until completion. Once a request has been submitted, the in-kernel
|
|
83
|
+
state is stable. Very early kernels (5.4 and earlier) required state to be
|
|
84
|
+
stable until the completion occurred. Applications can test for this
|
|
85
|
+
behavior by inspecting the
|
|
86
|
+
.B IORING_FEAT_SUBMIT_STABLE
|
|
87
|
+
flag passed back from
|
|
88
|
+
.BR io_uring_queue_init_params (3).
|
|
89
|
+
.SH SEE ALSO
|
|
90
|
+
.BR io_uring_get_sqe (3),
|
|
91
|
+
.BR io_uring_submit (3),
|
|
92
|
+
.BR io_uring_register (2)
|
|
@@ -0,0 +1,70 @@
|
|
|
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_fsync 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_fsync \- prepare an fsync request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <liburing.h>
|
|
11
|
+
.PP
|
|
12
|
+
.BI "void io_uring_prep_fsync(struct io_uring_sqe *" sqe ","
|
|
13
|
+
.BI " int " fd ","
|
|
14
|
+
.BI " unsigned " flags ");"
|
|
15
|
+
.fi
|
|
16
|
+
.SH DESCRIPTION
|
|
17
|
+
.PP
|
|
18
|
+
The
|
|
19
|
+
.BR io_uring_prep_fsync (3)
|
|
20
|
+
function prepares an fsync request. The submission queue entry
|
|
21
|
+
.I sqe
|
|
22
|
+
is setup to use the file descriptor
|
|
23
|
+
.I fd
|
|
24
|
+
that should get synced, with the modifier flags indicated by the
|
|
25
|
+
.I flags
|
|
26
|
+
argument.
|
|
27
|
+
|
|
28
|
+
This function prepares an fsync request. It can act either like an
|
|
29
|
+
.BR fsync (2)
|
|
30
|
+
operation, which is the default behavior. If
|
|
31
|
+
.B IORING_FSYNC_DATASYNC
|
|
32
|
+
is set in the
|
|
33
|
+
.I flags
|
|
34
|
+
argument, then it behaves like
|
|
35
|
+
.BR fdatasync (2).
|
|
36
|
+
If no range is specified, the
|
|
37
|
+
.I fd
|
|
38
|
+
will be synced from 0 to end-of-file.
|
|
39
|
+
|
|
40
|
+
It's possible to specify a range to sync, if one is desired. If the
|
|
41
|
+
.I off
|
|
42
|
+
field of the SQE is set to non-zero, then that indicates the offset to
|
|
43
|
+
start syncing at. If
|
|
44
|
+
.I len
|
|
45
|
+
is set in the SQE, then that indicates the size in bytes to sync from the
|
|
46
|
+
offset. Note that these fields are not accepted by this helper, so they have
|
|
47
|
+
to be set manually in the SQE after calling this prep helper.
|
|
48
|
+
|
|
49
|
+
.SH RETURN VALUE
|
|
50
|
+
None
|
|
51
|
+
.SH ERRORS
|
|
52
|
+
The CQE
|
|
53
|
+
.I res
|
|
54
|
+
field will contain the result of the operation. See the related man page for
|
|
55
|
+
details on possible values. Note that where synchronous system calls will return
|
|
56
|
+
.B -1
|
|
57
|
+
on failure and set
|
|
58
|
+
.I errno
|
|
59
|
+
to the actual error value, io_uring never uses
|
|
60
|
+
.IR errno .
|
|
61
|
+
Instead it returns the negated
|
|
62
|
+
.I errno
|
|
63
|
+
directly in the CQE
|
|
64
|
+
.I res
|
|
65
|
+
field.
|
|
66
|
+
.SH SEE ALSO
|
|
67
|
+
.BR io_uring_get_sqe (3),
|
|
68
|
+
.BR io_uring_submit (3),
|
|
69
|
+
.BR fsync (2),
|
|
70
|
+
.BR fdatasync (2)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
io_uring_prep_linkat.3
|
|
@@ -0,0 +1,91 @@
|
|
|
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_linkat 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_linkat \- prepare a linkat 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_linkat(struct io_uring_sqe *" sqe ","
|
|
15
|
+
.BI " int " olddirfd ","
|
|
16
|
+
.BI " const char *" oldpath ","
|
|
17
|
+
.BI " int " newdirfd ","
|
|
18
|
+
.BI " const char *" newpath ","
|
|
19
|
+
.BI " int " flags ");"
|
|
20
|
+
.PP
|
|
21
|
+
.BI "void io_uring_prep_link(struct io_uring_sqe *" sqe ","
|
|
22
|
+
.BI " const char *" oldpath ","
|
|
23
|
+
.BI " const char *" newpath ","
|
|
24
|
+
.BI " int " flags ");"
|
|
25
|
+
.fi
|
|
26
|
+
.SH DESCRIPTION
|
|
27
|
+
.PP
|
|
28
|
+
The
|
|
29
|
+
.BR io_uring_prep_linkat (3)
|
|
30
|
+
function prepares a linkat request. The submission queue entry
|
|
31
|
+
.I sqe
|
|
32
|
+
is setup to use the old directory file descriptor pointed to by
|
|
33
|
+
.I olddirfd
|
|
34
|
+
and old path pointed to by
|
|
35
|
+
.I oldpath
|
|
36
|
+
with the new directory file descriptor pointed to by
|
|
37
|
+
.I newdirfd
|
|
38
|
+
and the new path pointed to by
|
|
39
|
+
.I newpath
|
|
40
|
+
and using the specified flags in
|
|
41
|
+
.IR flags .
|
|
42
|
+
|
|
43
|
+
The
|
|
44
|
+
.BR io_uring_prep_link (3)
|
|
45
|
+
function prepares a link request. The submission queue entry
|
|
46
|
+
.I sqe
|
|
47
|
+
is setup to use the old path pointed to by
|
|
48
|
+
.I oldpath
|
|
49
|
+
and the new path pointed to by
|
|
50
|
+
.IR newpath ,
|
|
51
|
+
both relative to the current working directory and using the specified flags in
|
|
52
|
+
.IR flags .
|
|
53
|
+
|
|
54
|
+
These functions prepare an async
|
|
55
|
+
.BR linkat (2)
|
|
56
|
+
or
|
|
57
|
+
.BR link (2)
|
|
58
|
+
request. See those man pages for details.
|
|
59
|
+
|
|
60
|
+
.SH RETURN VALUE
|
|
61
|
+
None
|
|
62
|
+
.SH ERRORS
|
|
63
|
+
The CQE
|
|
64
|
+
.I res
|
|
65
|
+
field will contain the result of the operation. See the related man page for
|
|
66
|
+
details on possible values. Note that where synchronous system calls will return
|
|
67
|
+
.B -1
|
|
68
|
+
on failure and set
|
|
69
|
+
.I errno
|
|
70
|
+
to the actual error value, io_uring never uses
|
|
71
|
+
.IR errno .
|
|
72
|
+
Instead it returns the negated
|
|
73
|
+
.I errno
|
|
74
|
+
directly in the CQE
|
|
75
|
+
.I res
|
|
76
|
+
field.
|
|
77
|
+
.SH NOTES
|
|
78
|
+
As with any request that passes in data in a struct, that data must remain
|
|
79
|
+
valid until the request has been successfully submitted. It need not remain
|
|
80
|
+
valid until completion. Once a request has been submitted, the in-kernel
|
|
81
|
+
state is stable. Very early kernels (5.4 and earlier) required state to be
|
|
82
|
+
stable until the completion occurred. Applications can test for this
|
|
83
|
+
behavior by inspecting the
|
|
84
|
+
.B IORING_FEAT_SUBMIT_STABLE
|
|
85
|
+
flag passed back from
|
|
86
|
+
.BR io_uring_queue_init_params (3).
|
|
87
|
+
.SH SEE ALSO
|
|
88
|
+
.BR io_uring_get_sqe (3),
|
|
89
|
+
.BR io_uring_submit (3),
|
|
90
|
+
.BR linkat (2),
|
|
91
|
+
.BR link (2)
|
|
@@ -0,0 +1,56 @@
|
|
|
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_madvise 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_madvise \- prepare a madvise request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <sys/mman.h>
|
|
11
|
+
.B #include <liburing.h>
|
|
12
|
+
.PP
|
|
13
|
+
.BI "void io_uring_prep_madvise(struct io_uring_sqe *" sqe ","
|
|
14
|
+
.BI " void *" addr ","
|
|
15
|
+
.BI " off_t " len ","
|
|
16
|
+
.BI " int " advice ");"
|
|
17
|
+
.fi
|
|
18
|
+
.SH DESCRIPTION
|
|
19
|
+
.PP
|
|
20
|
+
The
|
|
21
|
+
.BR io_uring_prep_madvise (3)
|
|
22
|
+
function prepares an madvise request. The submission queue entry
|
|
23
|
+
.I sqe
|
|
24
|
+
is setup to start an madvise operation at the virtual address of
|
|
25
|
+
.I addr
|
|
26
|
+
and of
|
|
27
|
+
.I len
|
|
28
|
+
length in bytes, giving it the advise located in
|
|
29
|
+
.IR advice .
|
|
30
|
+
|
|
31
|
+
This function prepares an async
|
|
32
|
+
.BR madvise (2)
|
|
33
|
+
request. See that man page for details.
|
|
34
|
+
|
|
35
|
+
.SH RETURN VALUE
|
|
36
|
+
None
|
|
37
|
+
.SH ERRORS
|
|
38
|
+
The CQE
|
|
39
|
+
.I res
|
|
40
|
+
field will contain the result of the operation. See the related man page for
|
|
41
|
+
details on possible values. Note that where synchronous system calls will return
|
|
42
|
+
.B -1
|
|
43
|
+
on failure and set
|
|
44
|
+
.I errno
|
|
45
|
+
to the actual error value, io_uring never uses
|
|
46
|
+
.IR errno .
|
|
47
|
+
Instead it returns the negated
|
|
48
|
+
.I errno
|
|
49
|
+
directly in the CQE
|
|
50
|
+
.I res
|
|
51
|
+
field.
|
|
52
|
+
.SH SEE ALSO
|
|
53
|
+
.BR io_uring_get_sqe (3),
|
|
54
|
+
.BR io_uring_submit (3),
|
|
55
|
+
.BR io_uring_register (2),
|
|
56
|
+
.BR madvise (2)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
io_uring_prep_mkdirat.3
|
|
@@ -0,0 +1,83 @@
|
|
|
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_mkdirat 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_mkdirat \- prepare an mkdirat request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <fcntl.h>
|
|
11
|
+
.B #include <sys/stat.h>
|
|
12
|
+
.B #include <liburing.h>
|
|
13
|
+
.PP
|
|
14
|
+
.BI "void io_uring_prep_mkdirat(struct io_uring_sqe *" sqe ","
|
|
15
|
+
.BI " int " dirfd ","
|
|
16
|
+
.BI " const char *" path ","
|
|
17
|
+
.BI " mode_t " mode ");"
|
|
18
|
+
.PP
|
|
19
|
+
.BI "void io_uring_prep_mkdir(struct io_uring_sqe *" sqe ","
|
|
20
|
+
.BI " const char *" path ","
|
|
21
|
+
.BI " mode_t " mode ");"
|
|
22
|
+
.fi
|
|
23
|
+
.SH DESCRIPTION
|
|
24
|
+
.PP
|
|
25
|
+
The
|
|
26
|
+
.BR io_uring_prep_mkdirat (3)
|
|
27
|
+
function prepares a mkdirat 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 mkdirat operation on the path identified by
|
|
32
|
+
.I path
|
|
33
|
+
with the mode given in
|
|
34
|
+
.IR mode .
|
|
35
|
+
|
|
36
|
+
The
|
|
37
|
+
.BR io_uring_prep_mkdir (3)
|
|
38
|
+
function prepares a mkdir request. The submission queue entry
|
|
39
|
+
.I sqe
|
|
40
|
+
is setup to use the current working directory to start a mkdir
|
|
41
|
+
operation on the path identified by
|
|
42
|
+
.I path
|
|
43
|
+
with the mode given in
|
|
44
|
+
.IR mode .
|
|
45
|
+
|
|
46
|
+
These functions prepare an async
|
|
47
|
+
.BR mkdir (2)
|
|
48
|
+
or
|
|
49
|
+
.BR mkdirat (2)
|
|
50
|
+
request. See those man pages for details.
|
|
51
|
+
|
|
52
|
+
.SH RETURN VALUE
|
|
53
|
+
None
|
|
54
|
+
.SH ERRORS
|
|
55
|
+
The CQE
|
|
56
|
+
.I res
|
|
57
|
+
field will contain the result of the operation. See the related man page for
|
|
58
|
+
details on possible values. Note that where synchronous system calls will return
|
|
59
|
+
.B -1
|
|
60
|
+
on failure and set
|
|
61
|
+
.I errno
|
|
62
|
+
to the actual error value, io_uring never uses
|
|
63
|
+
.IR errno .
|
|
64
|
+
Instead it returns the negated
|
|
65
|
+
.I errno
|
|
66
|
+
directly in the CQE
|
|
67
|
+
.I res
|
|
68
|
+
field.
|
|
69
|
+
.SH NOTES
|
|
70
|
+
As with any request that passes in data in a struct, that data must remain
|
|
71
|
+
valid until the request has been successfully submitted. It need not remain
|
|
72
|
+
valid until completion. Once a request has been submitted, the in-kernel
|
|
73
|
+
state is stable. Very early kernels (5.4 and earlier) required state to be
|
|
74
|
+
stable until the completion occurred. Applications can test for this
|
|
75
|
+
behavior by inspecting the
|
|
76
|
+
.B IORING_FEAT_SUBMIT_STABLE
|
|
77
|
+
flag passed back from
|
|
78
|
+
.BR io_uring_queue_init_params (3).
|
|
79
|
+
.SH SEE ALSO
|
|
80
|
+
.BR io_uring_get_sqe (3),
|
|
81
|
+
.BR io_uring_submit (3),
|
|
82
|
+
.BR mkdirat (2),
|
|
83
|
+
.BR mkdir (2)
|
|
@@ -4,38 +4,38 @@
|
|
|
4
4
|
.\"
|
|
5
5
|
.TH io_uring_prep_msg_ring 3 "March 10, 2022" "liburing-2.2" "liburing Manual"
|
|
6
6
|
.SH NAME
|
|
7
|
-
io_uring_prep_msg_ring
|
|
8
|
-
|
|
7
|
+
io_uring_prep_msg_ring \- send a message to another ring
|
|
9
8
|
.SH SYNOPSIS
|
|
10
9
|
.nf
|
|
11
|
-
.
|
|
10
|
+
.B #include <liburing.h>
|
|
12
11
|
.PP
|
|
13
|
-
.BI "void
|
|
14
|
-
.BI " int fd,"
|
|
15
|
-
.BI " unsigned int len,"
|
|
16
|
-
.BI " __u64 data,"
|
|
17
|
-
.BI " unsigned int flags)"
|
|
18
|
-
|
|
12
|
+
.BI "void io_uring_prep_msg_ring(struct io_uring_sqe *" sqe ","
|
|
13
|
+
.BI " int " fd ","
|
|
14
|
+
.BI " unsigned int " len ","
|
|
15
|
+
.BI " __u64 " data ","
|
|
16
|
+
.BI " unsigned int " flags ");"
|
|
17
|
+
.fi
|
|
19
18
|
.SH DESCRIPTION
|
|
20
19
|
.PP
|
|
21
|
-
io_uring_prep_msg_ring()
|
|
22
|
-
descriptor. The submission queue
|
|
20
|
+
.BR io_uring_prep_msg_ring (3)
|
|
21
|
+
prepares a to send a CQE to an io_uring file descriptor. The submission queue
|
|
22
|
+
entry
|
|
23
23
|
.I sqe
|
|
24
24
|
is setup to use the file descriptor
|
|
25
|
-
.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
.
|
|
25
|
+
.IR fd ,
|
|
26
|
+
which must identify a io_uring context, to post a CQE on that ring where the
|
|
27
|
+
target CQE
|
|
28
|
+
.B res
|
|
29
29
|
field will contain the content of
|
|
30
30
|
.I len
|
|
31
31
|
and the
|
|
32
|
-
.
|
|
32
|
+
.B user_data
|
|
33
33
|
of
|
|
34
34
|
.I data
|
|
35
35
|
with the request modifier flags set by
|
|
36
|
-
.
|
|
36
|
+
.IR flags .
|
|
37
37
|
Currently there are no valid flag modifiers, this field must contain
|
|
38
|
-
.
|
|
38
|
+
.BR 0 .
|
|
39
39
|
|
|
40
40
|
The targeted ring may be any ring that the user has access to, even the ring
|
|
41
41
|
itself. This request can be used for simple message passing to another ring,
|
|
@@ -47,12 +47,26 @@ fields. The use case may be anything from simply waking up someone waiting
|
|
|
47
47
|
on the targeted ring, or it can be used to pass messages between the two
|
|
48
48
|
rings.
|
|
49
49
|
|
|
50
|
-
The resulting CQE posted on the target ring will have
|
|
51
|
-
.B IORING_CQE_F_MSG
|
|
52
|
-
set in its
|
|
53
|
-
.I flags
|
|
54
|
-
member, indicating to the target ring that this CQE is posted without having
|
|
55
|
-
a relationship to an SQE issued on this ring.
|
|
56
|
-
|
|
57
50
|
.SH RETURN VALUE
|
|
58
51
|
None
|
|
52
|
+
|
|
53
|
+
.SH ERRORS
|
|
54
|
+
These are the errors that are reported in the CQE
|
|
55
|
+
.I res
|
|
56
|
+
field.
|
|
57
|
+
.TP
|
|
58
|
+
.B -ENOMEM
|
|
59
|
+
The kernel was unable to allocate memory for the request.
|
|
60
|
+
.TP
|
|
61
|
+
.B -EINVAL
|
|
62
|
+
One of the fields set in the SQE was invalid.
|
|
63
|
+
.TP
|
|
64
|
+
.B -EBADFD
|
|
65
|
+
The descriptor passed in
|
|
66
|
+
.I fd
|
|
67
|
+
does not refer to an io_uring file descriptor.
|
|
68
|
+
.TP
|
|
69
|
+
.B -EOVERFLOW
|
|
70
|
+
The kernel was unable to fill a CQE on the target ring. This can happen if
|
|
71
|
+
the target CQ ring is in an overflow state and the kernel wasn't able to
|
|
72
|
+
allocate memory for a new CQE entry.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
io_uring_prep_accept.3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
io_uring_prep_accept.3
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.\" Copyright (C) 2022 Samuel Williams
|
|
2
|
+
.\"
|
|
3
|
+
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
|
4
|
+
.\"
|
|
5
|
+
.TH io_uring_prep_nop 3 "October 20, 2022" "liburing-2.2" "liburing Manual"
|
|
6
|
+
.SH NAME
|
|
7
|
+
io_uring_prep_nop \- prepare a nop request
|
|
8
|
+
.SH SYNOPSIS
|
|
9
|
+
.nf
|
|
10
|
+
.B #include <liburing.h>
|
|
11
|
+
.PP
|
|
12
|
+
.BI "void io_uring_prep_nop(struct io_uring_sqe *" sqe ");"
|
|
13
|
+
.fi
|
|
14
|
+
.SH DESCRIPTION
|
|
15
|
+
.PP
|
|
16
|
+
The
|
|
17
|
+
.BR io_uring_prep_nop (3)
|
|
18
|
+
function prepares nop (no operation) request. The submission queue entry
|
|
19
|
+
.I sqe
|
|
20
|
+
does not require any additional setup.
|
|
21
|
+
|
|
22
|
+
.SH RETURN VALUE
|
|
23
|
+
None
|
|
24
|
+
.SH ERRORS
|
|
25
|
+
None
|
|
26
|
+
.SH SEE ALSO
|
|
27
|
+
.BR io_uring_get_sqe (3),
|
|
28
|
+
.BR io_uring_submit (3),
|