* [PATCH liburing v2] man/io_uring_enter.2: update notes about direct open/accept
@ 2021-09-14 17:54 Pavel Begunkov
2021-09-14 18:18 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2021-09-14 17:54 UTC (permalink / raw)
To: Jens Axboe, io-uring
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 <[email protected]>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH liburing v2] man/io_uring_enter.2: update notes about direct open/accept
2021-09-14 17:54 [PATCH liburing v2] man/io_uring_enter.2: update notes about direct open/accept Pavel Begunkov
@ 2021-09-14 18:18 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-09-14 18:18 UTC (permalink / raw)
To: Pavel Begunkov, io-uring
On 9/14/21 11:54 AM, Pavel Begunkov wrote:
> 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.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-14 18:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-14 17:54 [PATCH liburing v2] man/io_uring_enter.2: update notes about direct open/accept Pavel Begunkov
2021-09-14 18:18 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox