Re: [Qemu-devel] [PATCH v8 16/16] block/io_uring: adds fd registration

2019-07-31 Thread Stefan Hajnoczi
On Tue, Jul 30, 2019 at 11:04:41PM +0530, Aarushi Mehta wrote: I'm concerned about file descriptor leaks. fd_array[] keeps file descriptors basically forever, even after the file is no longer in use by the rest of QEMU. There needs to be a call to unregister whenever a file is closed elsewhere i

[Qemu-devel] [PATCH v8 16/16] block/io_uring: adds fd registration

2019-07-30 Thread Aarushi Mehta
The fd registration API in io_uring registers a series of fds together that cannot be modified later. Thus, a hashtable maintains an index of fds registered and their index in the internally registered array. The existing fd array is unregistered and a new one submitted. Signed-off-by: Aarushi Meh