fuse-overlayfs
fuse-overlayfs copied to clipboard
Internal structure invalidation through filesystem events
We're using this project to underpin a large piece of our infrastructure, but have a use cases that do not seem to be covered with the current implementation.
Our system will use the layering structure of overlayfs in order to combine the work of multiple users and services. Doing so concurrently, however, is where I'm finding some difficulty. It appears that once a directory is read and combined through overlay, any changes in the underlying layers will not show up in the resulting mount.
Our fuse mounts are backed by a Spectrum Scale filesystem which has a built in kafka event system built in. My idea is to use those events in order to cause fuse-overlayfs to re-evaluate the internal ovl_node structure, but I really don't have a good idea where to start with this task.
Would the plugin system be capable of manipulating the needed internal structures? Or am I looking at a fork of this project?
we added a timeout=0 option for the FUSE mount to cover the use case where the underlying file system can change.
It is more expensive though as fuse-overlayfs doesn't keep any cache.
The plugins system doesn't actually have a mechanism to invalidate the cache, we could probably add it if it helps.
Do you access directly the Spectrum Scale file system mount for the lower layers or are you already using a plugin for doing it?
Could fuse-overlayfs take a hup to free the cache?
FUSE itself keeps same caches, and when we do the look up we must specify for how long the inode is valid. There is a way to invalidate a single inode, but I am not sure yet if it is possible to invalidate the entire file system, we'd need to look into it first before it can work with a signal
Would it be possible to have an option enable direct_io mode? (http://manpages.ubuntu.com/manpages/bionic/man8/mount.fuse.8.html)
Even if fuse-overlayfs has timeout=0, the file contents seem to be cached via the kernel, so after updating files in lower / upper the mount still serves stale data.
definitely. We can add such a feature.
Would you mind to open a PR to add it?
I am closing this issue since there was no feedback for more than a year