diff options
author | Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com> | 2022-05-30 16:15:20 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-05-31 11:50:06 +0300 |
commit | a7c41b4687f5902af70cd559806990930c8a307b (patch) | |
tree | d0fc3d8c3d4ac2bcccdf6065f770be66b71653b5 /ipc/mqueue.c | |
parent | 4278a0deb1f6cac40ded3362fe2a9827d7efee3d (diff) | |
download | linux-a7c41b4687f5902af70cd559806990930c8a307b.tar.xz |
io_uring: let IORING_OP_FILES_UPDATE support choosing fixed file slots
One big issue with the file registration feature is that it needs user
space apps to maintain free slot info about io_uring's fixed file table,
which really is a burden for development. io_uring now supports choosing
free file slot for user space apps by using IORING_FILE_INDEX_ALLOC flag
in accept, open, and socket operations, but they need the app to use
direct accept or direct open, which not all apps are prepared to use yet.
To support apps that still need real fds, make use of the registration
feature easier. Let IORING_OP_FILES_UPDATE support choosing fixed file
slots, which will store picked fixed files slots in fd array and let cqe
return the number of slots allocated.
Suggested-by: Hao Xu <howeyxu@tencent.com>
Signed-off-by: Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
[axboe: move flag to uapi io_uring header, change goto to break, init]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'ipc/mqueue.c')
0 files changed, 0 insertions, 0 deletions