From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: [PATCH liburing v2] man/io_uring_enter.2: add notes about direct open/accept
Date: Tue, 31 Aug 2021 21:54:25 +0100 [thread overview]
Message-ID: <cf33283b0f2e795ac7f9b6e2eabc70a4f71863c0.1630443189.git.asml.silence@gmail.com> (raw)
Add a few lines describing openat/openat2/accept bypassing normal file
tables and installing files right into the fixed file table.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
v2: s/non-negative/positive/ (Jens)
mention fixed files restrictions
man/io_uring_enter.2 | 48 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index 9ccedef..e1ae707 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -511,6 +511,22 @@ field. See also
.BR accept4(2)
for the general description of the related system call. Available since 5.5.
+If the
+.I file_index
+field is set to a positive number, the file won't be installed into the
+normal file table as usual but will be placed into the fixed file table at index
+.I file_index - 1.
+In this case, instead of returning a file descriptor, the result will contain
+either 0 on success or an error. If there is already a file registered at this
+index, the request will fail with
+.B -EBADF.
+Only io_uring has access to such files and no other syscall can use them. See
+.B IOSQE_FIXED_FILE
+and
+.B IORING_REGISTER_FILES.
+
+Available since 5.15.
+
.TP
.B IORING_OP_ASYNC_CANCEL
Attempt to cancel an already issued request.
@@ -634,6 +650,22 @@ is access mode of the file. See also
.BR openat(2)
for the general description of the related system call. Available since 5.6.
+If the
+.I file_index
+field is set to a positive number, the file won't be installed into the
+normal file table as usual but will be placed into the fixed file table at index
+.I file_index - 1.
+In this case, instead of returning a file descriptor, the result will contain
+either 0 on success or an error. If there is already a file registered at this
+index, the request will fail with
+.B -EBADF.
+Only io_uring has access to such files and no other syscall can use them. See
+.B IOSQE_FIXED_FILE
+and
+.B IORING_REGISTER_FILES.
+
+Available since 5.15.
+
.TP
.B IORING_OP_OPENAT2
Issue the equivalent of a
@@ -654,6 +686,22 @@ should be set to the address of the open_how structure. See also
.BR openat2(2)
for the general description of the related system call. Available since 5.6.
+If the
+.I file_index
+field is set to a positive number, the file won't be installed into the
+normal file table as usual but will be placed into the fixed file table at index
+.I file_index - 1.
+In this case, instead of returning a file descriptor, the result will contain
+either 0 on success or an error. If there is already a file registered at this
+index, the request will fail with
+.B -EBADF.
+Only io_uring has access to such files and no other syscall can use them. See
+.B IOSQE_FIXED_FILE
+and
+.B IORING_REGISTER_FILES.
+
+Available since 5.15.
+
.TP
.B IORING_OP_CLOSE
Issue the equivalent of a
--
2.33.0
next reply other threads:[~2021-08-31 20:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-31 20:54 Pavel Begunkov [this message]
2021-08-31 21:22 ` [PATCH liburing v2] man/io_uring_enter.2: add notes about direct open/accept Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf33283b0f2e795ac7f9b6e2eabc70a4f71863c0.1630443189.git.asml.silence@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.