io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: update notes about direct open/accept
Date: Tue, 14 Sep 2021 18:54:48 +0100	[thread overview]
Message-ID: <e5fe9b4c3130a5402e4328d87f214a98b39e33f7.1631642033.git.asml.silence@gmail.com> (raw)

Reflect recent changes in the man, i.e. direct open/accept now would try
to remove a file from the fixed file table if the slot they target is
already taken.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---

v2: note about replacing existing files

 man/io_uring_enter.2 | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index ad86961..6b31061 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -517,10 +517,12 @@ 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
+either 0 on success or an error. If the index points to a valid empty slot, the
+installation is guaranteed to not fail. If there is already a file in the slot,
+it will be replaced, similar to
+.B IORING_OP_FILES_UPDATE.
+Please note that 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.
@@ -656,10 +658,12 @@ 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
+either 0 on success or an error. If the index points to a valid empty slot, the
+installation is guaranteed to not fail. If there is already a file in the slot,
+it will be replaced, similar to
+.B IORING_OP_FILES_UPDATE.
+Please note that 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.
@@ -692,10 +696,12 @@ 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
+either 0 on success or an error. If the index points to a valid empty slot, the
+installation is guaranteed to not fail. If there is already a file in the slot,
+it will be replaced, similar to
+.B IORING_OP_FILES_UPDATE.
+Please note that 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.
-- 
2.33.0


             reply	other threads:[~2021-09-14 17:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 17:54 Pavel Begunkov [this message]
2021-09-14 18:18 ` [PATCH liburing v2] man/io_uring_enter.2: update 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=e5fe9b4c3130a5402e4328d87f214a98b39e33f7.1631642033.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).