polyphony 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/TODO.md +4 -0
- data/examples/core/debug.rb +12 -0
- data/examples/core/rpc_benchmark.rb +136 -0
- data/lib/polyphony/extensions/fiber.rb +1 -0
- data/lib/polyphony/extensions/socket.rb +42 -42
- data/lib/polyphony/version.rb +1 -1
- data/polyphony.gemspec +3 -1
- data/test/test_socket.rb +1 -1
- metadata +32 -149
- data/vendor/liburing/man/IO_URING_CHECK_VERSION.3 +0 -1
- data/vendor/liburing/man/IO_URING_VERSION_MAJOR.3 +0 -1
- data/vendor/liburing/man/IO_URING_VERSION_MINOR.3 +0 -1
- data/vendor/liburing/man/io_uring.7 +0 -781
- data/vendor/liburing/man/io_uring_buf_ring_add.3 +0 -53
- data/vendor/liburing/man/io_uring_buf_ring_advance.3 +0 -31
- data/vendor/liburing/man/io_uring_buf_ring_cq_advance.3 +0 -41
- data/vendor/liburing/man/io_uring_buf_ring_init.3 +0 -30
- data/vendor/liburing/man/io_uring_buf_ring_mask.3 +0 -27
- data/vendor/liburing/man/io_uring_check_version.3 +0 -72
- data/vendor/liburing/man/io_uring_close_ring_fd.3 +0 -43
- data/vendor/liburing/man/io_uring_cq_advance.3 +0 -49
- data/vendor/liburing/man/io_uring_cq_has_overflow.3 +0 -25
- data/vendor/liburing/man/io_uring_cq_ready.3 +0 -26
- data/vendor/liburing/man/io_uring_cqe_get_data.3 +0 -53
- data/vendor/liburing/man/io_uring_cqe_get_data64.3 +0 -1
- data/vendor/liburing/man/io_uring_cqe_seen.3 +0 -42
- data/vendor/liburing/man/io_uring_enter.2 +0 -1700
- data/vendor/liburing/man/io_uring_enter2.2 +0 -1
- data/vendor/liburing/man/io_uring_free_probe.3 +0 -27
- data/vendor/liburing/man/io_uring_get_events.3 +0 -33
- data/vendor/liburing/man/io_uring_get_probe.3 +0 -30
- data/vendor/liburing/man/io_uring_get_sqe.3 +0 -57
- data/vendor/liburing/man/io_uring_major_version.3 +0 -1
- data/vendor/liburing/man/io_uring_minor_version.3 +0 -1
- data/vendor/liburing/man/io_uring_opcode_supported.3 +0 -30
- data/vendor/liburing/man/io_uring_peek_cqe.3 +0 -38
- data/vendor/liburing/man/io_uring_prep_accept.3 +0 -197
- data/vendor/liburing/man/io_uring_prep_accept_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_cancel.3 +0 -118
- data/vendor/liburing/man/io_uring_prep_cancel64.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_close.3 +0 -59
- data/vendor/liburing/man/io_uring_prep_close_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_connect.3 +0 -66
- data/vendor/liburing/man/io_uring_prep_fadvise.3 +0 -59
- data/vendor/liburing/man/io_uring_prep_fallocate.3 +0 -59
- data/vendor/liburing/man/io_uring_prep_fgetxattr.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_files_update.3 +0 -92
- data/vendor/liburing/man/io_uring_prep_fsetxattr.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_fsync.3 +0 -70
- data/vendor/liburing/man/io_uring_prep_getxattr.3 +0 -61
- data/vendor/liburing/man/io_uring_prep_link.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_link_timeout.3 +0 -94
- data/vendor/liburing/man/io_uring_prep_linkat.3 +0 -91
- data/vendor/liburing/man/io_uring_prep_madvise.3 +0 -56
- data/vendor/liburing/man/io_uring_prep_mkdir.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_mkdirat.3 +0 -83
- data/vendor/liburing/man/io_uring_prep_msg_ring.3 +0 -92
- data/vendor/liburing/man/io_uring_prep_msg_ring_cqe_flags.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_multishot_accept.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_multishot_accept_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_nop.3 +0 -28
- data/vendor/liburing/man/io_uring_prep_openat.3 +0 -117
- data/vendor/liburing/man/io_uring_prep_openat2.3 +0 -117
- data/vendor/liburing/man/io_uring_prep_openat2_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_openat_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_poll_add.3 +0 -72
- data/vendor/liburing/man/io_uring_prep_poll_multishot.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_poll_remove.3 +0 -55
- data/vendor/liburing/man/io_uring_prep_poll_update.3 +0 -89
- data/vendor/liburing/man/io_uring_prep_provide_buffers.3 +0 -140
- data/vendor/liburing/man/io_uring_prep_read.3 +0 -69
- data/vendor/liburing/man/io_uring_prep_read_fixed.3 +0 -72
- data/vendor/liburing/man/io_uring_prep_readv.3 +0 -85
- data/vendor/liburing/man/io_uring_prep_readv2.3 +0 -111
- data/vendor/liburing/man/io_uring_prep_recv.3 +0 -105
- data/vendor/liburing/man/io_uring_prep_recv_multishot.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_recvmsg.3 +0 -124
- data/vendor/liburing/man/io_uring_prep_recvmsg_multishot.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_remove_buffers.3 +0 -52
- data/vendor/liburing/man/io_uring_prep_rename.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_renameat.3 +0 -96
- data/vendor/liburing/man/io_uring_prep_send.3 +0 -66
- data/vendor/liburing/man/io_uring_prep_send_set_addr.3 +0 -38
- data/vendor/liburing/man/io_uring_prep_send_zc.3 +0 -96
- data/vendor/liburing/man/io_uring_prep_send_zc_fixed.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_sendmsg.3 +0 -89
- data/vendor/liburing/man/io_uring_prep_sendmsg_zc.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_setxattr.3 +0 -64
- data/vendor/liburing/man/io_uring_prep_shutdown.3 +0 -53
- data/vendor/liburing/man/io_uring_prep_socket.3 +0 -118
- data/vendor/liburing/man/io_uring_prep_socket_direct.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_socket_direct_alloc.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_splice.3 +0 -120
- data/vendor/liburing/man/io_uring_prep_statx.3 +0 -74
- data/vendor/liburing/man/io_uring_prep_symlink.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_symlinkat.3 +0 -85
- data/vendor/liburing/man/io_uring_prep_sync_file_range.3 +0 -59
- data/vendor/liburing/man/io_uring_prep_tee.3 +0 -74
- data/vendor/liburing/man/io_uring_prep_timeout.3 +0 -95
- data/vendor/liburing/man/io_uring_prep_timeout_remove.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_timeout_update.3 +0 -98
- data/vendor/liburing/man/io_uring_prep_unlink.3 +0 -1
- data/vendor/liburing/man/io_uring_prep_unlinkat.3 +0 -82
- data/vendor/liburing/man/io_uring_prep_write.3 +0 -67
- data/vendor/liburing/man/io_uring_prep_write_fixed.3 +0 -72
- data/vendor/liburing/man/io_uring_prep_writev.3 +0 -85
- data/vendor/liburing/man/io_uring_prep_writev2.3 +0 -111
- data/vendor/liburing/man/io_uring_queue_exit.3 +0 -26
- data/vendor/liburing/man/io_uring_queue_init.3 +0 -89
- data/vendor/liburing/man/io_uring_queue_init_params.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_cmsg_firsthdr.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_cmsg_nexthdr.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_name.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_out.3 +0 -82
- data/vendor/liburing/man/io_uring_recvmsg_payload.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_payload_length.3 +0 -1
- data/vendor/liburing/man/io_uring_recvmsg_validate.3 +0 -1
- data/vendor/liburing/man/io_uring_register.2 +0 -834
- data/vendor/liburing/man/io_uring_register_buf_ring.3 +0 -140
- data/vendor/liburing/man/io_uring_register_buffers.3 +0 -104
- data/vendor/liburing/man/io_uring_register_buffers_sparse.3 +0 -1
- data/vendor/liburing/man/io_uring_register_buffers_tags.3 +0 -1
- data/vendor/liburing/man/io_uring_register_buffers_update_tag.3 +0 -1
- data/vendor/liburing/man/io_uring_register_eventfd.3 +0 -51
- data/vendor/liburing/man/io_uring_register_eventfd_async.3 +0 -1
- data/vendor/liburing/man/io_uring_register_file_alloc_range.3 +0 -52
- data/vendor/liburing/man/io_uring_register_files.3 +0 -112
- data/vendor/liburing/man/io_uring_register_files_sparse.3 +0 -1
- data/vendor/liburing/man/io_uring_register_files_tags.3 +0 -1
- data/vendor/liburing/man/io_uring_register_files_update.3 +0 -1
- data/vendor/liburing/man/io_uring_register_files_update_tag.3 +0 -1
- data/vendor/liburing/man/io_uring_register_iowq_aff.3 +0 -61
- data/vendor/liburing/man/io_uring_register_iowq_max_workers.3 +0 -71
- data/vendor/liburing/man/io_uring_register_ring_fd.3 +0 -49
- data/vendor/liburing/man/io_uring_register_sync_cancel.3 +0 -71
- data/vendor/liburing/man/io_uring_setup.2 +0 -669
- data/vendor/liburing/man/io_uring_sq_ready.3 +0 -31
- data/vendor/liburing/man/io_uring_sq_space_left.3 +0 -25
- data/vendor/liburing/man/io_uring_sqe_set_data.3 +0 -48
- data/vendor/liburing/man/io_uring_sqe_set_data64.3 +0 -1
- data/vendor/liburing/man/io_uring_sqe_set_flags.3 +0 -87
- data/vendor/liburing/man/io_uring_sqring_wait.3 +0 -34
- data/vendor/liburing/man/io_uring_submit.3 +0 -46
- data/vendor/liburing/man/io_uring_submit_and_get_events.3 +0 -31
- data/vendor/liburing/man/io_uring_submit_and_wait.3 +0 -38
- data/vendor/liburing/man/io_uring_submit_and_wait_timeout.3 +0 -56
- data/vendor/liburing/man/io_uring_unregister_buf_ring.3 +0 -30
- data/vendor/liburing/man/io_uring_unregister_buffers.3 +0 -27
- data/vendor/liburing/man/io_uring_unregister_eventfd.3 +0 -1
- data/vendor/liburing/man/io_uring_unregister_files.3 +0 -27
- data/vendor/liburing/man/io_uring_unregister_iowq_aff.3 +0 -1
- data/vendor/liburing/man/io_uring_unregister_ring_fd.3 +0 -32
- data/vendor/liburing/man/io_uring_wait_cqe.3 +0 -40
- data/vendor/liburing/man/io_uring_wait_cqe_nr.3 +0 -43
- data/vendor/liburing/man/io_uring_wait_cqe_timeout.3 +0 -53
- data/vendor/liburing/man/io_uring_wait_cqes.3 +0 -56
@@ -1,59 +0,0 @@
|
|
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)
|
@@ -1,59 +0,0 @@
|
|
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)
|
@@ -1 +0,0 @@
|
|
1
|
-
io_uring_prep_getxattr.3
|
@@ -1,92 +0,0 @@
|
|
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)
|
@@ -1 +0,0 @@
|
|
1
|
-
io_uring_prep_setxattr.3
|
@@ -1,70 +0,0 @@
|
|
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)
|
@@ -1,61 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2023 Rutvik Patel <heyrutvik@gmail.com>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_getxattr 3 "January 23, 2023" "liburing-2.4" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_getxattr, io_uring_prep_fgetxattr \- prepare a request to get an
|
8
|
-
extended attribute value
|
9
|
-
.SH SYNOPSIS
|
10
|
-
.nf
|
11
|
-
.B #include <liburing.h>
|
12
|
-
.PP
|
13
|
-
.BI "void io_uring_prep_getxattr(struct io_uring_sqe *" sqe ","
|
14
|
-
.BI " const char *" name ","
|
15
|
-
.BI " char *" value ","
|
16
|
-
.BI " const char *" path ","
|
17
|
-
.BI " unsigned int " len ");"
|
18
|
-
.PP
|
19
|
-
.BI "void io_uring_prep_fgetxattr(struct io_uring_sqe *" sqe ","
|
20
|
-
.BI " int " fd ","
|
21
|
-
.BI " const char *" name ","
|
22
|
-
.BI " char *" value ","
|
23
|
-
.BI " unsigned int " len ");"
|
24
|
-
.fi
|
25
|
-
.SH DESCRIPTION
|
26
|
-
.PP
|
27
|
-
The
|
28
|
-
.BR io_uring_prep_getxattr (3)
|
29
|
-
function prepares a request to get an extended attribute value. The submission
|
30
|
-
queue entry
|
31
|
-
.I sqe
|
32
|
-
is setup to get the
|
33
|
-
.I value
|
34
|
-
of the extended attribute identified by
|
35
|
-
.I name
|
36
|
-
and associated with the given
|
37
|
-
.I path
|
38
|
-
in the filesystem.
|
39
|
-
The
|
40
|
-
.I len
|
41
|
-
argument specifies the size (in bytes) of
|
42
|
-
.IR value .
|
43
|
-
|
44
|
-
.BR io_uring_prep_fgetxattr (3)
|
45
|
-
is identical to
|
46
|
-
.BR io_uring_prep_getxattr (3),
|
47
|
-
only the open file referred to by
|
48
|
-
.I fd
|
49
|
-
is interrogated in place of
|
50
|
-
.IR path .
|
51
|
-
|
52
|
-
This function prepares an async
|
53
|
-
.BR getxattr (2)
|
54
|
-
request. See that man page for details.
|
55
|
-
|
56
|
-
.SH RETURN VALUE
|
57
|
-
None
|
58
|
-
|
59
|
-
.SH SEE ALSO
|
60
|
-
.BR io_uring_get_sqe (3),
|
61
|
-
.BR getxattr (2)
|
@@ -1 +0,0 @@
|
|
1
|
-
io_uring_prep_linkat.3
|
@@ -1,94 +0,0 @@
|
|
1
|
-
.\" Copyright (C) 2023 Rutvik Patel <heyrutvik@gmail.com>
|
2
|
-
.\"
|
3
|
-
.\" SPDX-License-Identifier: LGPL-2.0-or-later
|
4
|
-
.\"
|
5
|
-
.TH io_uring_prep_link_timeout 3 "January 23, 2023" "liburing-2.4" "liburing Manual"
|
6
|
-
.SH NAME
|
7
|
-
io_uring_prep_link_timeout \- a timeout request for linked sqes
|
8
|
-
.SH SYNOPSIS
|
9
|
-
.nf
|
10
|
-
.B #include <liburing.h>
|
11
|
-
.PP
|
12
|
-
.BI "void io_uring_prep_link_timeout(struct io_uring_sqe *" sqe ","
|
13
|
-
.BI " struct __kernel_timespec *" ts ","
|
14
|
-
.BI " unsigned " flags ");"
|
15
|
-
.fi
|
16
|
-
.SH DESCRIPTION
|
17
|
-
.PP
|
18
|
-
The
|
19
|
-
.BR io_uring_prep_link_timeout (3)
|
20
|
-
function prepares a timeout request for linked sqes. The submission queue entry
|
21
|
-
.I sqe
|
22
|
-
is setup a timeout specified by
|
23
|
-
.IR ts .
|
24
|
-
The flags argument holds modifier
|
25
|
-
.I flags
|
26
|
-
for the timeout behaviour of the request.
|
27
|
-
|
28
|
-
The
|
29
|
-
.I ts
|
30
|
-
argument must be filled in with the appropriate information for the timeout. It looks as follows:
|
31
|
-
.PP
|
32
|
-
.in +4n
|
33
|
-
.EX
|
34
|
-
struct __kernel_timespec {
|
35
|
-
__kernel_time64_t tv_sec;
|
36
|
-
long long tv_nsec;
|
37
|
-
};
|
38
|
-
.EE
|
39
|
-
.in
|
40
|
-
.PP
|
41
|
-
|
42
|
-
The
|
43
|
-
.I flags
|
44
|
-
argument may contain:
|
45
|
-
.TP
|
46
|
-
.B IORING_TIMEOUT_ABS
|
47
|
-
The value specified in
|
48
|
-
.I ts
|
49
|
-
is an absolute value rather than a relative one.
|
50
|
-
.TP
|
51
|
-
.B IORING_TIMEOUT_BOOTTIME
|
52
|
-
The boottime clock source should be used.
|
53
|
-
.TP
|
54
|
-
.B IORING_TIMEOUT_REALTIME
|
55
|
-
The realtime clock source should be used.
|
56
|
-
.TP
|
57
|
-
.B IORING_TIMEOUT_ETIME_SUCCESS
|
58
|
-
Consider an expired timeout a success in terms of the posted completion.
|
59
|
-
.PP
|
60
|
-
|
61
|
-
It is invalid to create a chain (linked sqes) consisting only of a link timeout
|
62
|
-
request. If all the requests in the chain are completed before timeout, then the
|
63
|
-
link timeout request gets cancelled. Upon timeout, all the uncompleted requests
|
64
|
-
in the chain get cancelled.
|
65
|
-
|
66
|
-
.SH RETURN VALUE
|
67
|
-
None
|
68
|
-
|
69
|
-
.SH ERRORS
|
70
|
-
.PP
|
71
|
-
These are the errors that are reported in the CQE
|
72
|
-
.I res
|
73
|
-
field. On success,
|
74
|
-
.B 0
|
75
|
-
is returned.
|
76
|
-
.TP
|
77
|
-
.B -ETIME
|
78
|
-
The specified timeout occurred and triggered the completion event.
|
79
|
-
.TP
|
80
|
-
.B -EINVAL
|
81
|
-
One of the fields set in the SQE was invalid. For example, two clock sources
|
82
|
-
where given, or the specified timeout seconds or nanoseconds where < 0.
|
83
|
-
.TP
|
84
|
-
.B -EFAULT
|
85
|
-
io_uring was unable to access the data specified by ts.
|
86
|
-
.TP
|
87
|
-
.B -ECANCELED
|
88
|
-
The timeout was canceled because all submitted requests were completed successfully
|
89
|
-
or one of the requests resulted in failure.
|
90
|
-
|
91
|
-
|
92
|
-
.SH SEE ALSO
|
93
|
-
.BR io_uring_get_sqe (3),
|
94
|
-
.BR io_uring_prep_timeout (3)
|
@@ -1,91 +0,0 @@
|
|
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)
|
@@ -1,56 +0,0 @@
|
|
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)
|
@@ -1 +0,0 @@
|
|
1
|
-
io_uring_prep_mkdirat.3
|
@@ -1,83 +0,0 @@
|
|
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)
|