Skip to content

Difference between IORING_SETUP_REGISTERED_FD_ONLY and io_uring_register_ring_fd effects #1318

Closed Answered by axboe
AomaYple asked this question in Q&A
Discussion options

You must be logged in to vote

Registering the ring fd itself is indeed like registering normal files. But it doesn't go into the same table (that would cause a dependency loop), and hence you cannot use it for io_uring operations - it is only valid for io_uring syscalls, like io_uring_enter and io_uring_register. It achieves the same for syscalls, avoiding putting/getting of the file descriptor.

If so, should subsequent use of the ring be accompanied by a flag like IOSQE_FIXED_FILE(just an analogy, not necessarily this one) indicating the use of a registered regular file descriptor index?

Right, you need to pass in whether to use the registered ring fd to io_uring syscalls. To use it with io_uring_enter, you'd need …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@AomaYple
Comment options

@axboe
Comment options

axboe Jan 5, 2025
Maintainer

Answer selected by AomaYple
@AomaYple
Comment options

@axboe
Comment options

axboe Jan 5, 2025
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants