On 3/4/20 6:13 AM, Pavel Begunkov wrote: > On 04/03/2020 02:50, Jens Axboe wrote: >> This allows a chain link to set ->fd to IOSQE_FD_LAST_OPEN, which will >> then be turned into the results from the last open (or accept) request >> in the chain. If no open has been done, this isn't valid and the request >> will be errored with -EBADF. >> >> With this, we can define chains of open+read+close, where the read and >> close part can work on the fd instantiated by the open request. >> >> Totally a work in progress, POC so far. > > I'm concerned of having and supporting all these IOSQE flavours. Isn't it the > thing that can be potentially done with eBPF? It could totally be done with BPF, but honestly I'd love to avoid the extra dependency. But in talks with Josh, I really like his suggestion on being able to ask for a specific fd instead. I've reworked it to sit on top of that instead, I'll post a new series soon. -- Jens Axboe