On Sun, 8 Oct 2023 at 19:53, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > Ok, posted your original suggestion for opt-in to fake path: > https://lore.kernel.org/linux-fsdevel/20231007084433.1417887-1-amir73il@xxxxxxxxx/ > > Now the problem is that on FUSE_DEV_IOC_BACKING_OPEN ioctl, > the fake (fuse) path is not known. > > We can set the fake path on the first FOPEN_PASSTHROUGH response, > but then the whole concept of a backing id that is not bound to a > single file/inode > becomes a bit fuzzy. > > One solution is to allocate a backing_file container per fuse file on > FOPEN_PASSTHROUGH response. Right. How about the following idea: - mapping request is done with an O_PATH fd. - fuse_open() always opens a backing file (just like overlayfs) The disadvantage is one more struct file (the third). The advantage is that the server doesn't have to care about open flags, hence the mapping can always be per-inode. Thanks, Miklos