On 9/14/21 5:00 PM, 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. Nope, need to add a line about actually removing old files. Please ignore > Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> > --- > man/io_uring_enter.2 | 21 +++++++++------------ > 1 file changed, 9 insertions(+), 12 deletions(-) > > diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2 > index ad86961..037f31e 100644 > --- a/man/io_uring_enter.2 > +++ b/man/io_uring_enter.2 > @@ -517,10 +517,9 @@ 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. 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 +655,9 @@ 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. 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 +690,9 @@ 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. 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. > -- Pavel Begunkov