On 5/26/22 6:38 AM, Xiaoguang Wang wrote: > One big issue with 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. Now since io_uring > starts to choose free file slot for user space apps by using > IORING_FILE_INDEX_ALLOC flag in accept or open operations, but they > need app to uses direct accept or direct open, which as far as I know, > some apps are not prepared to use direct accept or open yet. > > To support apps, who still need real fds, use registration feature > easier, let IORING_OP_FILES_UPDATE support to choose fixed file slot, > which will return free file slot in cqe->res. This looks good. In retrospect, the direct open/accept/etc really should've just returned the direct descriptor in cqe->res, so we would not have this odd "0 for success when you pick a slot, <slot> in cqe->res if io_uring picks it". But this is consistent with the alloc case. Do you have a liburing test case too? I think we should just get this done for 5.19 rather than spread it over multiple releases, since 5.19 introduced the alloc as well. -- Jens Axboe