Skip to content

Commit

Permalink
update io_uring_prep_close.3
Browse files Browse the repository at this point in the history
Setting the `IOSQE_FIXED_FILE` flag in the direct close() SQE causes erroneous behavior users may not be aware of.

Signed-off-by: Christian Mazakas <christian.mazakas@gmail.com>
  • Loading branch information
cmazakas committed Aug 20, 2023
1 parent 660cefa commit be52164
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions man/io_uring_prep_close.3
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ argument instead of the
This is identical to unregistering the direct descriptor, and is provided as
a convenience.

To properly close a direct descriptor, the
.I sqe
flag
.B IOSQE_FIXED_FILE
should not be set. If the flag is set, the descriptor can be reused after a
manual call to
.BR io_uring_register_files_update (3) .
Otherwise the direct descriptor will not be available to operations that use
.BR IORING_FILE_INDEX_ALLOC .

These functions prepare an async
.BR close (2)
request. See that man page for details.
Expand Down

0 comments on commit be52164

Please sign in to comment.