On 10/22/20 11:52 AM, Jeff Moyer wrote: > Pavel Begunkov <asml.silence@xxxxxxxxx> writes: > >> Every close(io_uring) causes cancellation of all inflight requests >> carrying ->files. That's not nice but was neccessary up until recently. >> Now task->files removal is handled in the core code, so that part of >> flush can be removed. > > I don't understand the motivation for this patch. Why would an > application close the io_uring fd with outstanding requests? It normally wouldn't, of course. It's important to understand that this triggers for _any_ close. So if the app did a dup+close, then it'd still trigger. The point is that previously we _had_ to cancel requests that had ->files assigned, due to using a weak reference. Now we no longer have to, so the point is to just get rid of that previous oddity. -- Jens Axboe