From 91040e8b1e22de8ec79161bba6ced308cdf6b8fd Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 14 May 2022 09:28:11 -0600 Subject: open/openat2: update man page to include IORING_FILE_INDEX_ALLOC Signed-off-by: Jens Axboe --- man/io_uring_prep_openat.3 | 12 ++++++++++++ man/io_uring_prep_openat2.3 | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/man/io_uring_prep_openat.3 b/man/io_uring_prep_openat.3 index 8094619..b0f0946 100644 --- a/man/io_uring_prep_openat.3 +++ b/man/io_uring_prep_openat.3 @@ -67,6 +67,18 @@ Note that old kernels don't check the SQE field, which is not a problem for liburing helpers, but users of the raw io_uring interface need to zero SQEs to avoid unexpected behavior. +If +.B IORING_FILE_INDEX_ALLOC +is used as the +.I file_index +for a direct open, then io_uring will allocate a free direct descriptor in +the existing table. The allocated descriptor is returned in the CQE +.I res +field just like it would be for a non-direct open request. If no more entries +are available in the direct descriptor table, +.B -ENFILE +is returned instead. + This function prepares an async .BR openat (2) request. See that man page for details. diff --git a/man/io_uring_prep_openat2.3 b/man/io_uring_prep_openat2.3 index 4898e30..96682d8 100644 --- a/man/io_uring_prep_openat2.3 +++ b/man/io_uring_prep_openat2.3 @@ -67,6 +67,17 @@ Note that old kernels don't check the SQE .I file_index field, which is not a problem for liburing helpers, but users of the raw io_uring interface need to zero SQEs to avoid unexpected behavior. +If +.B IORING_FILE_INDEX_ALLOC +is used as the +.I file_index +for a direct open, then io_uring will allocate a free direct descriptor in +the existing table. The allocated descriptor is returned in the CQE +.I res +field just like it would be for a non-direct open request. If no more entries +are available in the direct descriptor table, +.B -ENFILE +is returned instead. This function prepares an async .BR openat2 (2) -- cgit v1.2.3