In liburing library, after initial registration of file descriptors using io_uring_register_files
api, we could use io_uring_register_files_update
to update the file descriptors. The file descriptor can be set to special value IORING_REGISTER_FILES_SKIP
. What is specific use case of this flag usage?
Note: Taken from liburing file_register.c test
io_uring_register_files(ring, files, 100);
files[90] = IORING_REGISTER_FILES_SKIP;
io_uring_register_files_update(ring, 90, &files[90], 1);
test_fixed_read_write(ring, 90); // This will use file index 90 with sqe flag IOSQE_FIXED_FILE
In above code is test_fixed_read_write() be successful? If yes, then what is the use of flag IORING_REGISTER_FILES_SKIP
?
IORING_REGISTER_FILES_SKIP = -2;
-1 has been used to indicate that the entry has been removed