polyphony 0.94 → 0.95

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +2 -2
  3. data/.gitignore +3 -3
  4. data/CHANGELOG.md +14 -0
  5. data/docs/api-reference/fiber.md +2 -2
  6. data/docs/api-reference/object.md +3 -3
  7. data/docs/main-concepts/exception-handling.md +2 -2
  8. data/ext/polyphony/backend_common.c +3 -3
  9. data/ext/polyphony/backend_io_uring.c +18 -16
  10. data/ext/polyphony/event.c +1 -1
  11. data/ext/polyphony/extconf.rb +5 -3
  12. data/ext/polyphony/fiber.c +5 -13
  13. data/ext/polyphony/io_extensions.c +1 -1
  14. data/ext/polyphony/pipe.c +1 -1
  15. data/ext/polyphony/polyphony.c +1 -1
  16. data/ext/polyphony/polyphony_ext.c +1 -1
  17. data/ext/polyphony/queue.c +1 -1
  18. data/ext/polyphony/ring_buffer.c +1 -0
  19. data/ext/polyphony/socket_extensions.c +1 -1
  20. data/ext/polyphony/thread.c +1 -1
  21. data/lib/polyphony/extensions/enumerator.rb +16 -0
  22. data/lib/polyphony/extensions/socket.rb +2 -0
  23. data/lib/polyphony/extensions.rb +1 -0
  24. data/lib/polyphony/version.rb +1 -1
  25. data/polyphony.gemspec +2 -2
  26. data/test/test_backend.rb +5 -1
  27. data/test/test_enumerator.rb +46 -0
  28. data/test/test_io.rb +241 -216
  29. data/test/test_socket.rb +1 -1
  30. data/test/test_thread_pool.rb +3 -3
  31. data/vendor/liburing/.github/workflows/build.yml +51 -5
  32. data/vendor/liburing/.github/workflows/shellcheck.yml +1 -1
  33. data/vendor/liburing/.gitignore +6 -123
  34. data/vendor/liburing/CHANGELOG +35 -0
  35. data/vendor/liburing/CITATION.cff +11 -0
  36. data/vendor/liburing/LICENSE +16 -3
  37. data/vendor/liburing/Makefile +3 -1
  38. data/vendor/liburing/Makefile.common +1 -0
  39. data/vendor/liburing/README +14 -2
  40. data/vendor/liburing/SECURITY.md +6 -0
  41. data/vendor/liburing/configure +16 -15
  42. data/vendor/liburing/examples/Makefile +4 -1
  43. data/vendor/liburing/examples/io_uring-udp.c +395 -0
  44. data/vendor/liburing/examples/poll-bench.c +101 -0
  45. data/vendor/liburing/examples/send-zerocopy.c +339 -0
  46. data/vendor/liburing/liburing.spec +1 -1
  47. data/vendor/liburing/man/io_uring.7 +38 -11
  48. data/vendor/liburing/man/io_uring_buf_ring_add.3 +53 -0
  49. data/vendor/liburing/man/io_uring_buf_ring_advance.3 +31 -0
  50. data/vendor/liburing/man/io_uring_buf_ring_cq_advance.3 +41 -0
  51. data/vendor/liburing/man/io_uring_buf_ring_init.3 +30 -0
  52. data/vendor/liburing/man/io_uring_buf_ring_mask.3 +27 -0
  53. data/vendor/liburing/man/io_uring_cq_advance.3 +29 -15
  54. data/vendor/liburing/man/io_uring_cq_has_overflow.3 +25 -0
  55. data/vendor/liburing/man/io_uring_cq_ready.3 +9 -8
  56. data/vendor/liburing/man/io_uring_cqe_get_data.3 +32 -13
  57. data/vendor/liburing/man/io_uring_cqe_get_data64.3 +1 -0
  58. data/vendor/liburing/man/io_uring_cqe_seen.3 +22 -12
  59. data/vendor/liburing/man/io_uring_enter.2 +249 -32
  60. data/vendor/liburing/man/io_uring_enter2.2 +1 -0
  61. data/vendor/liburing/man/io_uring_free_probe.3 +11 -8
  62. data/vendor/liburing/man/io_uring_get_events.3 +33 -0
  63. data/vendor/liburing/man/io_uring_get_probe.3 +9 -8
  64. data/vendor/liburing/man/io_uring_get_sqe.3 +29 -10
  65. data/vendor/liburing/man/io_uring_opcode_supported.3 +11 -10
  66. data/vendor/liburing/man/io_uring_peek_cqe.3 +38 -0
  67. data/vendor/liburing/man/io_uring_prep_accept.3 +197 -0
  68. data/vendor/liburing/man/io_uring_prep_accept_direct.3 +1 -0
  69. data/vendor/liburing/man/io_uring_prep_cancel.3 +118 -0
  70. data/vendor/liburing/man/io_uring_prep_cancel64.3 +1 -0
  71. data/vendor/liburing/man/io_uring_prep_close.3 +59 -0
  72. data/vendor/liburing/man/io_uring_prep_close_direct.3 +1 -0
  73. data/vendor/liburing/man/io_uring_prep_connect.3 +66 -0
  74. data/vendor/liburing/man/io_uring_prep_fadvise.3 +59 -0
  75. data/vendor/liburing/man/io_uring_prep_fallocate.3 +59 -0
  76. data/vendor/liburing/man/io_uring_prep_files_update.3 +92 -0
  77. data/vendor/liburing/man/io_uring_prep_fsync.3 +70 -0
  78. data/vendor/liburing/man/io_uring_prep_link.3 +1 -0
  79. data/vendor/liburing/man/io_uring_prep_linkat.3 +91 -0
  80. data/vendor/liburing/man/io_uring_prep_madvise.3 +56 -0
  81. data/vendor/liburing/man/io_uring_prep_mkdir.3 +1 -0
  82. data/vendor/liburing/man/io_uring_prep_mkdirat.3 +83 -0
  83. data/vendor/liburing/man/io_uring_prep_msg_ring.3 +39 -25
  84. data/vendor/liburing/man/io_uring_prep_multishot_accept.3 +1 -0
  85. data/vendor/liburing/man/io_uring_prep_multishot_accept_direct.3 +1 -0
  86. data/vendor/liburing/man/io_uring_prep_nop.3 +28 -0
  87. data/vendor/liburing/man/io_uring_prep_openat.3 +117 -0
  88. data/vendor/liburing/man/io_uring_prep_openat2.3 +117 -0
  89. data/vendor/liburing/man/io_uring_prep_openat2_direct.3 +1 -0
  90. data/vendor/liburing/man/io_uring_prep_openat_direct.3 +1 -0
  91. data/vendor/liburing/man/io_uring_prep_poll_add.3 +72 -0
  92. data/vendor/liburing/man/io_uring_prep_poll_multishot.3 +1 -0
  93. data/vendor/liburing/man/io_uring_prep_poll_remove.3 +55 -0
  94. data/vendor/liburing/man/io_uring_prep_poll_update.3 +89 -0
  95. data/vendor/liburing/man/io_uring_prep_provide_buffers.3 +131 -0
  96. data/vendor/liburing/man/io_uring_prep_read.3 +33 -14
  97. data/vendor/liburing/man/io_uring_prep_read_fixed.3 +39 -21
  98. data/vendor/liburing/man/io_uring_prep_readv.3 +49 -15
  99. data/vendor/liburing/man/io_uring_prep_readv2.3 +49 -17
  100. data/vendor/liburing/man/io_uring_prep_recv.3 +105 -0
  101. data/vendor/liburing/man/io_uring_prep_recv_multishot.3 +1 -0
  102. data/vendor/liburing/man/io_uring_prep_recvmsg.3 +124 -0
  103. data/vendor/liburing/man/io_uring_prep_recvmsg_multishot.3 +1 -0
  104. data/vendor/liburing/man/io_uring_prep_remove_buffers.3 +52 -0
  105. data/vendor/liburing/man/io_uring_prep_rename.3 +1 -0
  106. data/vendor/liburing/man/io_uring_prep_renameat.3 +96 -0
  107. data/vendor/liburing/man/io_uring_prep_send.3 +57 -0
  108. data/vendor/liburing/man/io_uring_prep_send_zc.3 +64 -0
  109. data/vendor/liburing/man/io_uring_prep_sendmsg.3 +69 -0
  110. data/vendor/liburing/man/io_uring_prep_shutdown.3 +53 -0
  111. data/vendor/liburing/man/io_uring_prep_socket.3 +118 -0
  112. data/vendor/liburing/man/io_uring_prep_socket_direct.3 +1 -0
  113. data/vendor/liburing/man/io_uring_prep_socket_direct_alloc.3 +1 -0
  114. data/vendor/liburing/man/io_uring_prep_splice.3 +80 -0
  115. data/vendor/liburing/man/io_uring_prep_statx.3 +74 -0
  116. data/vendor/liburing/man/io_uring_prep_symlink.3 +1 -0
  117. data/vendor/liburing/man/io_uring_prep_symlinkat.3 +85 -0
  118. data/vendor/liburing/man/io_uring_prep_sync_file_range.3 +59 -0
  119. data/vendor/liburing/man/io_uring_prep_tee.3 +74 -0
  120. data/vendor/liburing/man/io_uring_prep_timeout.3 +95 -0
  121. data/vendor/liburing/man/io_uring_prep_timeout_remove.3 +1 -0
  122. data/vendor/liburing/man/io_uring_prep_timeout_update.3 +98 -0
  123. data/vendor/liburing/man/io_uring_prep_unlink.3 +1 -0
  124. data/vendor/liburing/man/io_uring_prep_unlinkat.3 +82 -0
  125. data/vendor/liburing/man/io_uring_prep_write.3 +32 -15
  126. data/vendor/liburing/man/io_uring_prep_write_fixed.3 +39 -21
  127. data/vendor/liburing/man/io_uring_prep_writev.3 +50 -16
  128. data/vendor/liburing/man/io_uring_prep_writev2.3 +50 -17
  129. data/vendor/liburing/man/io_uring_queue_exit.3 +3 -4
  130. data/vendor/liburing/man/io_uring_queue_init.3 +58 -13
  131. data/vendor/liburing/man/io_uring_queue_init_params.3 +1 -0
  132. data/vendor/liburing/man/io_uring_recvmsg_cmsg_firsthdr.3 +1 -0
  133. data/vendor/liburing/man/io_uring_recvmsg_cmsg_nexthdr.3 +1 -0
  134. data/vendor/liburing/man/io_uring_recvmsg_name.3 +1 -0
  135. data/vendor/liburing/man/io_uring_recvmsg_out.3 +78 -0
  136. data/vendor/liburing/man/io_uring_recvmsg_payload.3 +1 -0
  137. data/vendor/liburing/man/io_uring_recvmsg_payload_length.3 +1 -0
  138. data/vendor/liburing/man/io_uring_recvmsg_validate.3 +1 -0
  139. data/vendor/liburing/man/io_uring_register.2 +153 -13
  140. data/vendor/liburing/man/io_uring_register_buf_ring.3 +140 -0
  141. data/vendor/liburing/man/io_uring_register_buffers.3 +32 -12
  142. data/vendor/liburing/man/io_uring_register_eventfd.3 +51 -0
  143. data/vendor/liburing/man/io_uring_register_eventfd_async.3 +1 -0
  144. data/vendor/liburing/man/io_uring_register_file_alloc_range.3 +52 -0
  145. data/vendor/liburing/man/io_uring_register_files.3 +33 -11
  146. data/vendor/liburing/man/io_uring_register_files_sparse.3 +1 -0
  147. data/vendor/liburing/man/io_uring_register_iowq_aff.3 +61 -0
  148. data/vendor/liburing/man/io_uring_register_iowq_max_workers.3 +71 -0
  149. data/vendor/liburing/man/io_uring_register_ring_fd.3 +49 -0
  150. data/vendor/liburing/man/io_uring_register_sync_cancel.3 +71 -0
  151. data/vendor/liburing/man/io_uring_setup.2 +119 -13
  152. data/vendor/liburing/man/io_uring_sq_ready.3 +14 -8
  153. data/vendor/liburing/man/io_uring_sq_space_left.3 +9 -9
  154. data/vendor/liburing/man/io_uring_sqe_set_data.3 +29 -11
  155. data/vendor/liburing/man/io_uring_sqe_set_data64.3 +1 -0
  156. data/vendor/liburing/man/io_uring_sqe_set_flags.3 +38 -11
  157. data/vendor/liburing/man/io_uring_sqring_wait.3 +13 -9
  158. data/vendor/liburing/man/io_uring_submit.3 +29 -12
  159. data/vendor/liburing/man/io_uring_submit_and_get_events.3 +31 -0
  160. data/vendor/liburing/man/io_uring_submit_and_wait.3 +16 -12
  161. data/vendor/liburing/man/io_uring_submit_and_wait_timeout.3 +30 -23
  162. data/vendor/liburing/man/io_uring_unregister_buf_ring.3 +30 -0
  163. data/vendor/liburing/man/io_uring_unregister_buffers.3 +11 -10
  164. data/vendor/liburing/man/io_uring_unregister_eventfd.3 +1 -0
  165. data/vendor/liburing/man/io_uring_unregister_files.3 +11 -10
  166. data/vendor/liburing/man/io_uring_unregister_iowq_aff.3 +1 -0
  167. data/vendor/liburing/man/io_uring_unregister_ring_fd.3 +32 -0
  168. data/vendor/liburing/man/io_uring_wait_cqe.3 +19 -12
  169. data/vendor/liburing/man/io_uring_wait_cqe_nr.3 +21 -14
  170. data/vendor/liburing/man/io_uring_wait_cqe_timeout.3 +27 -13
  171. data/vendor/liburing/man/io_uring_wait_cqes.3 +24 -14
  172. data/vendor/liburing/src/Makefile +8 -7
  173. data/vendor/liburing/src/arch/aarch64/lib.h +48 -0
  174. data/vendor/liburing/src/arch/aarch64/syscall.h +0 -4
  175. data/vendor/liburing/src/arch/generic/lib.h +0 -4
  176. data/vendor/liburing/src/arch/generic/syscall.h +29 -16
  177. data/vendor/liburing/src/arch/syscall-defs.h +41 -14
  178. data/vendor/liburing/src/arch/x86/lib.h +0 -21
  179. data/vendor/liburing/src/arch/x86/syscall.h +146 -10
  180. data/vendor/liburing/src/include/liburing/io_uring.h +245 -5
  181. data/vendor/liburing/src/include/liburing.h +468 -35
  182. data/vendor/liburing/src/int_flags.h +1 -0
  183. data/vendor/liburing/src/lib.h +20 -16
  184. data/vendor/liburing/src/liburing.map +16 -0
  185. data/vendor/liburing/src/nolibc.c +1 -1
  186. data/vendor/liburing/src/queue.c +87 -55
  187. data/vendor/liburing/src/register.c +129 -53
  188. data/vendor/liburing/src/setup.c +65 -28
  189. data/vendor/liburing/src/syscall.c +14 -32
  190. data/vendor/liburing/src/syscall.h +12 -64
  191. data/vendor/liburing/test/{232c93d07b74-test.c → 232c93d07b74.c} +8 -9
  192. data/vendor/liburing/test/{35fa71a030ca-test.c → 35fa71a030ca.c} +4 -4
  193. data/vendor/liburing/test/{500f9fbadef8-test.c → 500f9fbadef8.c} +7 -7
  194. data/vendor/liburing/test/{7ad0e4b2f83c-test.c → 7ad0e4b2f83c.c} +8 -7
  195. data/vendor/liburing/test/{8a9973408177-test.c → 8a9973408177.c} +4 -3
  196. data/vendor/liburing/test/{917257daa0fe-test.c → 917257daa0fe.c} +3 -2
  197. data/vendor/liburing/test/Makefile +60 -62
  198. data/vendor/liburing/test/{a0908ae19763-test.c → a0908ae19763.c} +3 -2
  199. data/vendor/liburing/test/{a4c0b3decb33-test.c → a4c0b3decb33.c} +3 -2
  200. data/vendor/liburing/test/accept-link.c +5 -4
  201. data/vendor/liburing/test/accept-reuse.c +17 -16
  202. data/vendor/liburing/test/accept-test.c +14 -10
  203. data/vendor/liburing/test/accept.c +529 -107
  204. data/vendor/liburing/test/across-fork.c +7 -6
  205. data/vendor/liburing/test/{b19062a56726-test.c → b19062a56726.c} +3 -2
  206. data/vendor/liburing/test/{b5837bd5311d-test.c → b5837bd5311d.c} +10 -9
  207. data/vendor/liburing/test/buf-ring.c +420 -0
  208. data/vendor/liburing/test/{ce593a6c480a-test.c → ce593a6c480a.c} +15 -12
  209. data/vendor/liburing/test/connect.c +8 -7
  210. data/vendor/liburing/test/cq-full.c +5 -4
  211. data/vendor/liburing/test/cq-overflow.c +242 -12
  212. data/vendor/liburing/test/cq-peek-batch.c +5 -4
  213. data/vendor/liburing/test/cq-ready.c +5 -4
  214. data/vendor/liburing/test/cq-size.c +5 -4
  215. data/vendor/liburing/test/{d4ae271dfaae-test.c → d4ae271dfaae.c} +2 -2
  216. data/vendor/liburing/test/{d77a67ed5f27-test.c → d77a67ed5f27.c} +6 -6
  217. data/vendor/liburing/test/defer-taskrun.c +336 -0
  218. data/vendor/liburing/test/defer.c +26 -14
  219. data/vendor/liburing/test/double-poll-crash.c +15 -5
  220. data/vendor/liburing/test/drop-submit.c +5 -3
  221. data/vendor/liburing/test/{eeed8b54e0df-test.c → eeed8b54e0df.c} +7 -6
  222. data/vendor/liburing/test/empty-eownerdead.c +4 -4
  223. data/vendor/liburing/test/eventfd-disable.c +48 -20
  224. data/vendor/liburing/test/eventfd-reg.c +10 -9
  225. data/vendor/liburing/test/eventfd-ring.c +13 -12
  226. data/vendor/liburing/test/eventfd.c +13 -12
  227. data/vendor/liburing/test/exit-no-cleanup.c +1 -1
  228. data/vendor/liburing/test/fadvise.c +3 -3
  229. data/vendor/liburing/test/fallocate.c +16 -9
  230. data/vendor/liburing/test/{fc2a85cb02ef-test.c → fc2a85cb02ef.c} +4 -3
  231. data/vendor/liburing/test/fd-pass.c +187 -0
  232. data/vendor/liburing/test/file-register.c +302 -36
  233. data/vendor/liburing/test/file-update.c +62 -4
  234. data/vendor/liburing/test/file-verify.c +6 -2
  235. data/vendor/liburing/test/files-exit-hang-poll.c +11 -25
  236. data/vendor/liburing/test/files-exit-hang-timeout.c +13 -10
  237. data/vendor/liburing/test/fixed-buf-iter.c +115 -0
  238. data/vendor/liburing/test/fixed-link.c +10 -10
  239. data/vendor/liburing/test/fixed-reuse.c +160 -0
  240. data/vendor/liburing/test/fpos.c +6 -3
  241. data/vendor/liburing/test/fsync.c +3 -3
  242. data/vendor/liburing/test/hardlink.c +10 -6
  243. data/vendor/liburing/test/helpers.c +137 -4
  244. data/vendor/liburing/test/helpers.h +27 -0
  245. data/vendor/liburing/test/io-cancel.c +16 -11
  246. data/vendor/liburing/test/io_uring_enter.c +46 -81
  247. data/vendor/liburing/test/io_uring_passthrough.c +451 -0
  248. data/vendor/liburing/test/io_uring_register.c +59 -229
  249. data/vendor/liburing/test/io_uring_setup.c +24 -29
  250. data/vendor/liburing/test/iopoll-leak.c +85 -0
  251. data/vendor/liburing/test/iopoll.c +16 -9
  252. data/vendor/liburing/test/lfs-openat-write.c +3 -1
  253. data/vendor/liburing/test/link-timeout.c +4 -3
  254. data/vendor/liburing/test/link.c +8 -7
  255. data/vendor/liburing/test/madvise.c +2 -2
  256. data/vendor/liburing/test/mkdir.c +9 -5
  257. data/vendor/liburing/test/msg-ring.c +46 -20
  258. data/vendor/liburing/test/multicqes_drain.c +51 -12
  259. data/vendor/liburing/test/nolibc.c +60 -0
  260. data/vendor/liburing/test/nop.c +78 -16
  261. data/vendor/liburing/test/nvme.h +168 -0
  262. data/vendor/liburing/test/open-direct-link.c +188 -0
  263. data/vendor/liburing/test/open-direct-pick.c +180 -0
  264. data/vendor/liburing/test/openat2.c +3 -3
  265. data/vendor/liburing/test/poll-cancel-all.c +472 -0
  266. data/vendor/liburing/test/poll-link.c +9 -18
  267. data/vendor/liburing/test/poll-mshot-overflow.c +162 -0
  268. data/vendor/liburing/test/poll-mshot-update.c +83 -33
  269. data/vendor/liburing/test/pollfree.c +2 -2
  270. data/vendor/liburing/test/read-before-exit.c +112 -0
  271. data/vendor/liburing/test/read-write.c +83 -1
  272. data/vendor/liburing/test/recv-msgall-stream.c +398 -0
  273. data/vendor/liburing/test/recv-msgall.c +265 -0
  274. data/vendor/liburing/test/recv-multishot.c +505 -0
  275. data/vendor/liburing/test/rename.c +2 -5
  276. data/vendor/liburing/test/ring-leak.c +97 -0
  277. data/vendor/liburing/test/ringbuf-read.c +200 -0
  278. data/vendor/liburing/test/rsrc_tags.c +25 -13
  279. data/vendor/liburing/test/runtests-quiet.sh +11 -0
  280. data/vendor/liburing/test/runtests.sh +18 -20
  281. data/vendor/liburing/test/rw_merge_test.c +3 -2
  282. data/vendor/liburing/test/send-zerocopy.c +684 -0
  283. data/vendor/liburing/test/send_recv.c +49 -2
  284. data/vendor/liburing/test/send_recvmsg.c +165 -55
  285. data/vendor/liburing/test/shutdown.c +3 -4
  286. data/vendor/liburing/test/sigfd-deadlock.c +22 -8
  287. data/vendor/liburing/test/single-issuer.c +171 -0
  288. data/vendor/liburing/test/socket-rw-eagain.c +2 -12
  289. data/vendor/liburing/test/socket-rw-offset.c +2 -11
  290. data/vendor/liburing/test/socket-rw.c +2 -11
  291. data/vendor/liburing/test/socket.c +409 -0
  292. data/vendor/liburing/test/sq-poll-dup.c +1 -1
  293. data/vendor/liburing/test/sq-poll-share.c +1 -1
  294. data/vendor/liburing/test/statx.c +2 -2
  295. data/vendor/liburing/test/submit-and-wait.c +108 -0
  296. data/vendor/liburing/test/submit-link-fail.c +5 -3
  297. data/vendor/liburing/test/submit-reuse.c +0 -2
  298. data/vendor/liburing/test/sync-cancel.c +235 -0
  299. data/vendor/liburing/test/test.h +35 -0
  300. data/vendor/liburing/test/timeout-overflow.c +11 -11
  301. data/vendor/liburing/test/timeout.c +7 -7
  302. data/vendor/liburing/test/tty-write-dpoll.c +60 -0
  303. data/vendor/liburing/test/unlink.c +1 -1
  304. data/vendor/liburing/test/xattr.c +425 -0
  305. metadata +143 -22
  306. data/Gemfile.lock +0 -78
@@ -4,23 +4,24 @@
4
4
  .\"
5
5
  .TH io_uring_prep_read 3 "February 13, 2022" "liburing-2.1" "liburing Manual"
6
6
  .SH NAME
7
- io_uring_prep_read_fixed - prepare I/O read request with registered buffer
8
-
7
+ io_uring_prep_read_fixed \- prepare I/O read request with registered buffer
9
8
  .SH SYNOPSIS
10
9
  .nf
11
- .BR "#include <liburing.h>"
10
+ .B #include <liburing.h>
12
11
  .PP
13
- .BI "void io_uring_prep_read_fixed(struct io_uring_sqe *sqe,"
14
- .BI " int fd,"
15
- .BI " void *buf,"
16
- .BI " unsigned nbytes,"
17
- .BI " __u64 offset,"
18
- .BI " int buf_index)"
19
-
12
+ .BI "void io_uring_prep_read_fixed(struct io_uring_sqe *" sqe ","
13
+ .BI " int " fd ","
14
+ .BI " void *" buf ","
15
+ .BI " unsigned " nbytes ","
16
+ .BI " __u64 " offset ","
17
+ .BI " int " buf_index ");"
18
+ .fi
20
19
  .SH DESCRIPTION
21
20
  .PP
22
- The io_uring_prep_read_fixed() prepares an IO read request with a previously
23
- registered IO buffer. The submission queue entry
21
+ The
22
+ .BR io_uring_prep_read_fixed (3)
23
+ prepares an IO read request with a previously registered IO buffer. The
24
+ submission queue entry
24
25
  .I sqe
25
26
  is setup to use the file descriptor
26
27
  .I fd
@@ -29,19 +30,20 @@ to start reading
29
30
  into the buffer
30
31
  .I buf
31
32
  at the specified
32
- .I offset,
33
+ .IR offset ,
33
34
  and with the buffer matching the registered index of
34
- .I buf_index.
35
+ .IR buf_index .
35
36
 
36
- This work just like
37
- .B io_uring_prep_read(3)
38
- except it requires the user of buffers that have been registered with
39
- .B io_uring_register_buffers(3). The
37
+ This works just like
38
+ .BR io_uring_prep_read (3)
39
+ except it requires the use of buffers that have been registered with
40
+ .BR io_uring_register_buffers (3).
41
+ The
40
42
  .I buf
41
43
  and
42
44
  .I nbytes
43
- arguments must fall within a region specificed by
44
- .I buf_index.
45
+ arguments must fall within a region specified by
46
+ .I buf_index
45
47
  in the previously registered buffer. The buffer need not be aligned with
46
48
  the start of the registered buffer.
47
49
 
@@ -50,5 +52,21 @@ functions.
50
52
 
51
53
  .SH RETURN VALUE
52
54
  None
55
+ .SH ERRORS
56
+ The CQE
57
+ .I res
58
+ field will contain the result of the operation. See the related man page for
59
+ details on possible values. Note that where synchronous system calls will return
60
+ .B -1
61
+ on failure and set
62
+ .I errno
63
+ to the actual error value, io_uring never uses
64
+ .IR errno .
65
+ Instead it returns the negated
66
+ .I errno
67
+ directly in the CQE
68
+ .I res
69
+ field.
53
70
  .SH SEE ALSO
54
- .BR io_uring_prep_read (3), io_uring_register_buffers (3)
71
+ .BR io_uring_prep_read (3),
72
+ .BR io_uring_register_buffers (3)
@@ -4,22 +4,23 @@
4
4
  .\"
5
5
  .TH io_uring_prep_readv 3 "November 15, 2021" "liburing-2.1" "liburing Manual"
6
6
  .SH NAME
7
- io_uring_prep_readv - prepare vector I/O read request
8
- .fi
7
+ io_uring_prep_readv \- prepare vector I/O read request
9
8
  .SH SYNOPSIS
10
9
  .nf
11
- .BR "#include <liburing.h>"
12
- .PP
13
- .BI "void io_uring_prep_readv(struct io_uring_sqe *sqe,"
14
- .BI " int fd,"
15
- .BI " const struct iovec *iovecs,"
16
- .BI " unsigned nr_vecs,"
17
- .BI " __u64 offset)"
10
+ .B #include <sys/uio.h>
11
+ .B #include <liburing.h>
18
12
  .PP
13
+ .BI "void io_uring_prep_readv(struct io_uring_sqe *" sqe ","
14
+ .BI " int " fd ","
15
+ .BI " const struct iovec *" iovecs ","
16
+ .BI " unsigned " nr_vecs ","
17
+ .BI " __u64 " offset ");"
18
+ .fi
19
19
  .SH DESCRIPTION
20
20
  .PP
21
- The io_uring_prep_readv() prepares a vectored IO read request. The submission
22
- queue entry
21
+ The
22
+ .BR io_uring_prep_readv (3)
23
+ prepares a vectored IO read request. The submission queue entry
23
24
  .I sqe
24
25
  is setup to use the file descriptor
25
26
  .I fd
@@ -28,10 +29,10 @@ to start reading
28
29
  into the
29
30
  .I iovecs
30
31
  array at the specified
31
- .I offset.
32
+ .IR offset .
32
33
 
33
34
  On files that support seeking, if the offset is set to
34
- .B -1,
35
+ .BR -1 ,
35
36
  the read operation commences at the file offset, and the file offset is
36
37
  incremented by the number of bytes read. See
37
38
  .BR read (2)
@@ -40,12 +41,45 @@ current file offset may result in unpredictable behavior, unless access
40
41
  to the file is serialized. It is not encouraged to use this feature, if it's
41
42
  possible to provide the desired IO offset from the application or library.
42
43
 
43
- On files that are not capable of seeking, the offset is ignored.
44
+ On files that are not capable of seeking, the offset must be 0 or -1.
44
45
 
45
46
  After the write has been prepared it can be submitted with one of the submit
46
47
  functions.
47
48
 
48
49
  .SH RETURN VALUE
49
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 NOTES
67
+ Unless an application explicitly needs to pass in more than iovec, it is more
68
+ efficient to use
69
+ .BR io_uring_prep_read (3)
70
+ rather than this function, as no state has to be maintained for a
71
+ non-vectored IO request.
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).
50
81
  .SH SEE ALSO
51
- .BR io_uring_get_sqe (3), io_uring_prep_read (3), io_uring_prep_readv2 (3), io_uring_submit (3)
82
+ .BR io_uring_get_sqe (3),
83
+ .BR io_uring_prep_read (3),
84
+ .BR io_uring_prep_readv2 (3),
85
+ .BR io_uring_submit (3)
@@ -4,25 +4,24 @@
4
4
  .\"
5
5
  .TH io_uring_prep_readv2 3 "November 15, 2021" "liburing-2.1" "liburing Manual"
6
6
  .SH NAME
7
- .fi
8
- io_uring_prep_readv2 - prepare vector I/O read request with flags
9
-
7
+ io_uring_prep_readv2 \- prepare vector I/O read request with flags
10
8
  .SH SYNOPSIS
11
9
  .nf
12
- .BR "#include <liburing.h>"
10
+ .B #include <sys/uio.h>
11
+ .B #include <liburing.h>
13
12
  .PP
14
- .BI "void io_uring_prep_readv2(struct io_uring_sqe *sqe,"
15
- .BI " int fd,"
16
- .BI " const struct iovec *iovecs,"
17
- .BI " unsigned nr_vecs,"
18
- .BI " __u64 offset,"
19
- .BI " int flags)"
13
+ .BI "void io_uring_prep_readv2(struct io_uring_sqe *" sqe ","
14
+ .BI " int " fd ","
15
+ .BI " const struct iovec *" iovecs ","
16
+ .BI " unsigned " nr_vecs ","
17
+ .BI " __u64 " offset ","
18
+ .BI " int " flags ");"
20
19
  .fi
21
- .PP
22
20
  .SH DESCRIPTION
23
21
  .PP
24
- The io_uring_prep_readv2() prepares a vectored IO read request. The submission
25
- queue entry
22
+ The
23
+ .BR io_uring_prep_readv2 (3)
24
+ prepares a vectored IO read request. The submission queue entry
26
25
  .I sqe
27
26
  is setup to use the file descriptor
28
27
  .I fd
@@ -31,7 +30,7 @@ to start reading
31
30
  into the
32
31
  .I iovecs
33
32
  array at the specified
34
- .I offset.
33
+ .IR offset .
35
34
  The behavior of the function can be controlled with the
36
35
  .I flags
37
36
  parameter.
@@ -59,7 +58,7 @@ per-IO O_APPEND
59
58
 
60
59
  .P
61
60
  On files that support seeking, if the offset is set to
62
- .B -1,
61
+ .BR -1 ,
63
62
  the read operation commences at the file offset, and the file offset is
64
63
  incremented by the number of bytes read. See
65
64
  .BR read (2)
@@ -68,12 +67,45 @@ current file offset may result in unpredictable behavior, unless access
68
67
  to the file is serialized. It is not encouraged to use this feature, if it's
69
68
  possible to provide the desired IO offset from the application or library.
70
69
 
71
- On files that are not capable of seeking, the offset is ignored.
70
+ On files that are not capable of seeking, the offset must be 0 or -1.
72
71
 
73
72
  After the write has been prepared, it can be submitted with one of the submit
74
73
  functions.
75
74
 
76
75
  .SH RETURN VALUE
77
76
  None
77
+ .SH ERRORS
78
+ The CQE
79
+ .I res
80
+ field will contain the result of the operation. See the related man page for
81
+ details on possible values. Note that where synchronous system calls will return
82
+ .B -1
83
+ on failure and set
84
+ .I errno
85
+ to the actual error value, io_uring never uses
86
+ .IR errno .
87
+ Instead it returns the negated
88
+ .I errno
89
+ directly in the CQE
90
+ .I res
91
+ field.
92
+ .SH NOTES
93
+ Unless an application explicitly needs to pass in more than iovec, it is more
94
+ efficient to use
95
+ .BR io_uring_prep_read (3)
96
+ rather than this function, as no state has to be maintained for a
97
+ non-vectored IO request.
98
+ As with any request that passes in data in a struct, that data must remain
99
+ valid until the request has been successfully submitted. It need not remain
100
+ valid until completion. Once a request has been submitted, the in-kernel
101
+ state is stable. Very early kernels (5.4 and earlier) required state to be
102
+ stable until the completion occurred. Applications can test for this
103
+ behavior by inspecting the
104
+ .B IORING_FEAT_SUBMIT_STABLE
105
+ flag passed back from
106
+ .BR io_uring_queue_init_params (3).
78
107
  .SH SEE ALSO
79
- .BR io_uring_get_sqe (3), io_uring_prep_read (3), io_uring_prep_readv (3), io_uring_submit (3)
108
+ .BR io_uring_get_sqe (3),
109
+ .BR io_uring_prep_read (3),
110
+ .BR io_uring_prep_readv (3),
111
+ .BR io_uring_submit (3)
@@ -0,0 +1,105 @@
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_recv 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
6
+ .SH NAME
7
+ io_uring_prep_recv \- prepare a recv request
8
+ .SH SYNOPSIS
9
+ .nf
10
+ .B #include <liburing.h>
11
+ .PP
12
+ .BI "void io_uring_prep_recv(struct io_uring_sqe *" sqe ","
13
+ .BI " int " sockfd ","
14
+ .BI " void *" buf ","
15
+ .BI " size_t " len ","
16
+ .BI " int " flags ");"
17
+ .PP
18
+ .BI "void io_uring_prep_recv_multishot(struct io_uring_sqe *" sqe ","
19
+ .BI " int " sockfd ","
20
+ .BI " void *" buf ","
21
+ .BI " size_t " len ","
22
+ .BI " int " flags ");"
23
+ .fi
24
+ .SH DESCRIPTION
25
+ .PP
26
+ The
27
+ .BR io_uring_prep_recv (3)
28
+ function prepares a recv request. The submission
29
+ queue entry
30
+ .I sqe
31
+ is setup to use the file descriptor
32
+ .I sockfd
33
+ to start receiving the data into the buffer destination
34
+ .I buf
35
+ of size
36
+ .I size
37
+ and with modifier flags
38
+ .IR flags .
39
+
40
+ This function prepares an async
41
+ .BR recv (2)
42
+ request. See that man page for details on the arguments specified to this
43
+ prep helper.
44
+
45
+ The multishot version allows the application to issue a single receive request,
46
+ which repeatedly posts a CQE when data is available. It requires length to be 0
47
+ , the
48
+ .B IOSQE_BUFFER_SELECT
49
+ flag to be set and no
50
+ .B MSG_WAITALL
51
+ flag to be set.
52
+ Therefore each CQE will take a buffer out of a provided buffer pool for receiving.
53
+ The application should check the flags of each CQE, regardless of it's result.
54
+ If a posted CQE does not have the
55
+ .B IORING_CQE_F_MORE
56
+ flag set then the multishot receive will be done and the application should issue a
57
+ new request.
58
+ Multishot variants are available since kernel 6.0.
59
+
60
+
61
+ After calling this function, additional io_uring internal modifier flags
62
+ may be set in the SQE
63
+ .I ioprio
64
+ field. The following flags are supported:
65
+ .TP
66
+ .B IORING_RECVSEND_POLL_FIRST
67
+ If set, io_uring will assume the socket is currently empty and attempting to
68
+ receive data will be unsuccessful. For this case, io_uring will arm internal
69
+ poll and trigger a receive of the data when the socket has data to be read.
70
+ This initial receive attempt can be wasteful for the case where the socket
71
+ is expected to be empty, setting this flag will bypass the initial receive
72
+ attempt and go straight to arming poll. If poll does indicate that data is
73
+ ready to be received, the operation will proceed.
74
+
75
+ Can be used with the CQE
76
+ .B IORING_CQE_F_SOCK_NONEMPTY
77
+ flag, which io_uring will set on CQEs after a
78
+ .BR recv (2)
79
+ or
80
+ .BR recvmsg (2)
81
+ operation. If set, the socket still had data to be read after the operation
82
+ completed. Both these flags are available since 5.19.
83
+ .P
84
+
85
+ .SH RETURN VALUE
86
+ None
87
+ .SH ERRORS
88
+ The CQE
89
+ .I res
90
+ field will contain the result of the operation. See the related man page for
91
+ details on possible values. Note that where synchronous system calls will return
92
+ .B -1
93
+ on failure and set
94
+ .I errno
95
+ to the actual error value, io_uring never uses
96
+ .IR errno .
97
+ Instead it returns the negated
98
+ .I errno
99
+ directly in the CQE
100
+ .I res
101
+ field.
102
+ .SH SEE ALSO
103
+ .BR io_uring_get_sqe (3),
104
+ .BR io_uring_submit (3),
105
+ .BR recv (2)
@@ -0,0 +1 @@
1
+ io_uring_prep_recv.3
@@ -0,0 +1,124 @@
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_recvmsg 3 "March 12, 2022" "liburing-2.2" "liburing Manual"
6
+ .SH NAME
7
+ io_uring_prep_recvmsg \- prepare a recvmsg 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_recvmsg(struct io_uring_sqe *" sqe ","
15
+ .BI " int " fd ","
16
+ .BI " struct msghdr *" msg ","
17
+ .BI " unsigned " flags ");"
18
+ .PP
19
+ .BI "void io_uring_prep_recvmsg_multishot(struct io_uring_sqe *" sqe ","
20
+ .BI " int " fd ","
21
+ .BI " struct msghdr *" msg ","
22
+ .BI " unsigned " flags ");"
23
+ .fi
24
+ .SH DESCRIPTION
25
+ .PP
26
+ The
27
+ .BR io_uring_prep_recvmsg (3)
28
+ function prepares a recvmsg request. The submission queue entry
29
+ .I sqe
30
+ is setup to use the file descriptor
31
+ .I fd
32
+ to start receiving the data indicated by
33
+ .I msg
34
+ with the
35
+ .BR recvmsg (2)
36
+ defined flags in the
37
+ .I flags
38
+ argument.
39
+
40
+ This function prepares an async
41
+ .BR recvmsg (2)
42
+ request. See that man page for details on the arguments specified to this
43
+ prep helper.
44
+
45
+ The multishot version allows the application to issue a single receive request,
46
+ which repeatedly posts a CQE when data is available. It requires the
47
+ .B IOSQE_BUFFER_SELECT
48
+ flag to be set and no
49
+ .B MSG_WAITALL
50
+ flag to be set.
51
+ Therefore each CQE will take a buffer out of a provided buffer pool for receiving.
52
+ The application should check the flags of each CQE, regardless of it's result.
53
+ If a posted CQE does not have the
54
+ .B IORING_CQE_F_MORE
55
+ flag set then the multishot receive will be done and the application should issue a
56
+ new request.
57
+
58
+ Unlike
59
+ .BR recvmsg (2)
60
+ , multishot recvmsg will prepend a
61
+ .I struct io_uring_recvmsg_out
62
+ which describes the layout of the rest of the buffer in combination with the initial
63
+ .I struct msghdr
64
+ submitted with the request. See
65
+ .B io_uring_recvmsg_out (3)
66
+ for more information on accessing the data.
67
+
68
+ Multishot variants are available since kernel 6.0.
69
+
70
+ After calling this function, additional io_uring internal modifier flags
71
+ may be set in the SQE
72
+ .I ioprio
73
+ field. The following flags are supported:
74
+ .TP
75
+ .B IORING_RECVSEND_POLL_FIRST
76
+ If set, io_uring will assume the socket is currently empty and attempting to
77
+ receive data will be unsuccessful. For this case, io_uring will arm internal
78
+ poll and trigger a receive of the data when the socket has data to be read.
79
+ This initial receive attempt can be wasteful for the case where the socket
80
+ is expected to be empty, setting this flag will bypass the initial receive
81
+ attempt and go straight to arming poll. If poll does indicate that data is
82
+ ready to be received, the operation will proceed.
83
+
84
+ Can be used with the CQE
85
+ .B IORING_CQE_F_SOCK_NONEMPTY
86
+ flag, which io_uring will set on CQEs after a
87
+ .BR recv (2)
88
+ or
89
+ .BR recvmsg (2)
90
+ operation. If set, the socket still had data to be read after the operation
91
+ completed. Both these flags are available since 5.19.
92
+ .P
93
+
94
+ .SH RETURN VALUE
95
+ None
96
+ .SH ERRORS
97
+ The CQE
98
+ .I res
99
+ field will contain the result of the operation. See the related man page for
100
+ details on possible values. Note that where synchronous system calls will return
101
+ .B -1
102
+ on failure and set
103
+ .I errno
104
+ to the actual error value, io_uring never uses
105
+ .IR errno .
106
+ Instead it returns the negated
107
+ .I errno
108
+ directly in the CQE
109
+ .I res
110
+ field.
111
+ .SH NOTES
112
+ As with any request that passes in data in a struct, that data must remain
113
+ valid until the request has been successfully submitted. It need not remain
114
+ valid until completion. Once a request has been submitted, the in-kernel
115
+ state is stable. Very early kernels (5.4 and earlier) required state to be
116
+ stable until the completion occurred. Applications can test for this
117
+ behavior by inspecting the
118
+ .B IORING_FEAT_SUBMIT_STABLE
119
+ flag passed back from
120
+ .BR io_uring_queue_init_params (3).
121
+ .SH SEE ALSO
122
+ .BR io_uring_get_sqe (3),
123
+ .BR io_uring_submit (3),
124
+ .BR recvmsg (2)
@@ -0,0 +1 @@
1
+ io_uring_prep_recvmsg.3
@@ -0,0 +1,52 @@
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_remove_buffers 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
6
+ .SH NAME
7
+ io_uring_prep_remove_buffers \- prepare a remove buffers request
8
+ .SH SYNOPSIS
9
+ .nf
10
+ .B #include <liburing.h>
11
+ .PP
12
+ .BI "void io_uring_prep_remove_buffers(struct io_uring_sqe *" sqe ","
13
+ .BI " int " nr ","
14
+ .BI " int " bgid ");"
15
+ .fi
16
+ .SH DESCRIPTION
17
+ .PP
18
+ The
19
+ .BR io_uring_prep_remove_buffers (3)
20
+ function prepares a request for removing previously supplied buffers. The
21
+ submission queue entry
22
+ .I sqe
23
+ is setup to remove
24
+ .I nr
25
+ number of buffers from the buffer group ID indicated by
26
+ .IR bgid .
27
+
28
+ .SH RETURN VALUE
29
+ None
30
+ .SH ERRORS
31
+ These are the errors that are reported in the CQE
32
+ .I res
33
+ field. On success,
34
+ .I res
35
+ will contain the number of successfully removed buffers. On error,
36
+ the following errors can occur.
37
+ .TP
38
+ .B -ENOMEM
39
+ The kernel was unable to allocate memory for the request.
40
+ .TP
41
+ .B -EINVAL
42
+ One of the fields set in the SQE was invalid.
43
+ .TP
44
+ .B -ENOENT
45
+ No buffers exist at the specified
46
+ .I bgid
47
+ buffer group ID.
48
+ .SH SEE ALSO
49
+ .BR io_uring_get_sqe (3),
50
+ .BR io_uring_submit (3),
51
+ .BR io_uring_register (2),
52
+ .BR io_uring_prep_provide_buffers (3)
@@ -0,0 +1 @@
1
+ io_uring_prep_renameat.3
@@ -0,0 +1,96 @@
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_renameat 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
6
+ .SH NAME
7
+ io_uring_prep_renameat \- prepare a renameat request
8
+ .SH SYNOPSIS
9
+ .nf
10
+ .B #include <fcntl.h>
11
+ .B #include <stdio.h>
12
+ .B #include <liburing.h>
13
+ .PP
14
+ .BI "void io_uring_prep_renameat(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 " unsigned int " flags ");"
20
+ .PP
21
+ .BI "void io_uring_prep_rename(struct io_uring_sqe *" sqe ","
22
+ .BI " const char *" oldpath ","
23
+ .BI " const char *" newpath ","
24
+ .BI " unsigned int " flags ");"
25
+ .fi
26
+ .SH DESCRIPTION
27
+ .PP
28
+ The
29
+ .BR io_uring_prep_renameat (3)
30
+ function prepares a renameat 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_rename (3)
45
+ function prepares a rename request. The submission queue entry
46
+ .I sqe
47
+ is setup to use the old path pointed to by
48
+ .I oldpath
49
+ with 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 renameat2 (2)
56
+ or
57
+ .BR rename (2)
58
+ request. If
59
+ .I flags
60
+ is zero, then this call is similar to the
61
+ .BR renameat (2)
62
+ system call. See those man pages for details.
63
+
64
+ .SH RETURN VALUE
65
+ None
66
+ .SH ERRORS
67
+ The CQE
68
+ .I res
69
+ field will contain the result of the operation. See the related man page for
70
+ details on possible values. Note that where synchronous system calls will return
71
+ .B -1
72
+ on failure and set
73
+ .I errno
74
+ to the actual error value, io_uring never uses
75
+ .IR errno .
76
+ Instead it returns the negated
77
+ .I errno
78
+ directly in the CQE
79
+ .I res
80
+ field.
81
+ .SH NOTES
82
+ As with any request that passes in data in a struct, that data must remain
83
+ valid until the request has been successfully submitted. It need not remain
84
+ valid until completion. Once a request has been submitted, the in-kernel
85
+ state is stable. Very early kernels (5.4 and earlier) required state to be
86
+ stable until the completion occurred. Applications can test for this
87
+ behavior by inspecting the
88
+ .B IORING_FEAT_SUBMIT_STABLE
89
+ flag passed back from
90
+ .BR io_uring_queue_init_params (3).
91
+ .SH SEE ALSO
92
+ .BR io_uring_get_sqe (3),
93
+ .BR io_uring_submit (3),
94
+ .BR renameat (2),
95
+ .BR renameat2 (2),
96
+ .BR rename (2)