On Mon, Sep 12, 2022 at 4:03 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > > On Mon, 12 Sept 2022 at 14:29, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > > > On Mon, Sep 12, 2022 at 12:29 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > > > > > > On Sat, 10 Sept 2022 at 10:52, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > > > > BTW, I see that the Android team is presenting eBPF-FUSE on LPC > > > > coming Tuesday [1]. > > > > > > At first glance it looks like a filtered kernel-only passthrough + > > > fuse fallback, where filtering is provided by eBPF scripts and only > > > falls back to userspace access on more complex cases. Maybe it's a > > > good direction, we'll see. > > > > Yeh, we'll see. > > > > > Apparently the passthrough case is > > > important enough for various use cases. > > > > > > > Indeed. > > My use case is HSM and I think that using FUSE for HSM is becoming > > more and more common these days. > > HSM? > Sorry, Hierarchical Storage Management. such as the product described at: https://github.com/github/libprojfs/blob/master/docs/design.md#vfsforgit-on-windows > > > > One of the things that bothers me is that both this FUSE_PASSTHROUGH > > patch set and any future eBPF-FUSE passthrough implementation is > > bound to duplicate a lot of code and know how from overlayfs > > (along with the bugs). > > > > We could try to factor out some common bits to a kernel fs passthough > > library. > > Yeah, although fuse/passthrough might not want all the complexity. > Getting rid of the context switch latency is the easy part. Getting > rid of page cache duplication is the hard one, though it seems that the > current level of hacks in overlayfs seems sufficient and nobody much > cares for the corner cases (or works around them). > FWIW duplicate page cache exists in passthough FUSE whether passthrough is in kernel or in userspace, but going through yet another "switch" fs would make things even worse. I have another completely different solution that I am considering for HSM that is a little less flexible than FUSE, but does not have many of the passthrough challenges: https://lore.kernel.org/linux-fsdevel/CAOQ4uxhrQ7hySTyHM0Atq=uzbNdHyGV5wfadJarhAu1jDFOUTg@xxxxxxxxxxxxxx/ > > > > Anotehr options to consider is not to add any passthrough logic > > to FUSE at all. > > > > Instead, implement a "switch" fs to choose between passthrough > > to one of several underlying fs "branches", where one of the branches > > could be local fs and another a FUSE fs (i.e. for the complex cases). > > st_dev/st_ino management might become a headache (as it is in overlayfs). > Yeh. It's interesting how passthough of readdir and lookup/create in eBPF-FUSE is going to handle those things... Thanks, Amir.