On Mon, 12 Sept 2022 at 15:26, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > 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 imagine the "switch" layer for a HSM would be simple enough: a) if file exists on fastest layer (upper) then take that b) if not then fall back to fuse layer (lower) . It's almost like a read-only overlayfs (no copy up) except it would be read-write and copy-up/down would be performed by the server as needed. No page cache duplication for upper, and AFAICS no corner cases that overlayfs has, since all layers are consistent (the fuse layer would reference the upper if that is currently the up-to-date one). readdir would go to the layer which has the complete directory (which I guess the lower one must always have, but the upper could also). I'm probably missing lots of details, though... Thanks, Miklos