On Wed, May 24, 2023 at 1:03 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > On Mon, May 22, 2023 at 6:20 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > > > > On Fri, 19 May 2023 at 14:57, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > > > > > Extend the passthrough feature by handling asynchronous IO both for read > > > and write operations. > > > > > > When an AIO request is received, if the request targets a FUSE file with > > > the passthrough functionality enabled, a new identical AIO request is > > > created. The new request targets the backing file and gets assigned > > > a special FUSE passthrough AIO completion callback. > > > > > > When the backing file AIO request is completed, the FUSE > > > passthrough AIO completion callback is executed and propagates the > > > completion signal to the FUSE AIO request by triggering its completion > > > callback as well. > > > > Overlayfs added refcounting to the async req (commit 9a2544037600 > > ("ovl: fix use after free in struct ovl_aio_req")). Is that not > > needed for fuse as well? > > > > Would it make sense to try and merge the two implementations? > > > > Makes sense - I will look into it. Hi Miklos, Getting back to this. Did you mean something like that? (only compile tested) https://github.com/amir73il/linux/commits/backing_fs If yes, then I wonder: 1. Is the difference between FUSE_IOCB_MASK and OVL_IOCB_MASK (i.e. the APPEND flag) intentional? 2. What would be the right way to do ovl_copyattr() on io completion? Pass another completion handler to read/write helpers? This seems a bit ugly. Do you have a nicer idea? Thanks, Amir.