On 10/4/19 12:17 PM, Jeff Moyer wrote: > Jens Axboe <axboe@xxxxxxxxx> writes: > >> Currently we only support registrering a fixed file set. If changes need >> to be made to that set, the application must unregister the existing set >> first, then register a new one. >> >> This patchset adds support for sparse file sets (patch 1), which means >> the application can register a fileset with room for expansion. This is >> done through having unregistered slots use fd == -1. >> >> On top of that, we can add IORING_REGISTER_FILES_UPDATE. This allows >> modifying the existing file set through: >> >> - Replacing empty slots with valid file descriptors >> - Replacing valid descriptors with an empty slot >> - Modifying an existing slot, replacing a file descriptor with a new one > > I don't pretend to understand the socket code you wrote. The io_uring > bits look good to me. I also added a testcase to your file-register.c > program--diff below. The test passes, of course. :) Great, thanks Jeff, I'll add this to the test case. -- Jens Axboe