public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH liburing] man/io_uring_enter.2: add notes about direct open/accept
@ 2021-08-31 19:52 Pavel Begunkov
  2021-08-31 20:04 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Begunkov @ 2021-08-31 19:52 UTC (permalink / raw)
  To: Jens Axboe, io-uring

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 <[email protected]>
---
 man/io_uring_enter.2 | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index 9ccedef..52a5e13 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -511,6 +511,18 @@ 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 non-negative 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
+0 on success or an error. If there is already a file registered at this index,
+the request will fail with
+.B -EBADF.
+
+Available since 5.15.
+
 .TP
 .B IORING_OP_ASYNC_CANCEL
 Attempt to cancel an already issued request.
@@ -634,6 +646,18 @@ 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 non-negative 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
+0 on success or an error. If there is already a file registered at this index,
+the request will fail with
+.B -EBADF.
+
+Available since 5.15.
+
 .TP
 .B IORING_OP_OPENAT2
 Issue the equivalent of a
@@ -654,6 +678,18 @@ 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 non-negative 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
+0 on success or an error. If there is already a file registered at this index,
+the request will fail with
+.B -EBADF.
+
+Available since 5.15.
+
 .TP
 .B IORING_OP_CLOSE
 Issue the equivalent of a
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-31 20:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-31 19:52 [PATCH liburing] man/io_uring_enter.2: add notes about direct open/accept Pavel Begunkov
2021-08-31 20:04 ` Jens Axboe
2021-08-31 20:07   ` Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox