You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the README it's said that "You get caching which speeds things up a lot for free". I'd like that sentence to be explained a bit deeper: Does it mean that the system can cache the contents of files read through unionfs-fuse? If affirmative, can that behaviour be disabled? (I'd like to modify the code of unionfs-fuse for a system where I'd like different processes to see different versions of the files, so if the OS will cache the contents of the files, I guess it will ruin my goal...)
The text was updated successfully, but these errors were encountered:
There is a no caching in union-fuse itself, but at the same time fuse page cache is enabled by default - with current linking of unionfs-fuse to libfuse2, this can be disabled. I think this option is gone with libfuse3 and we probably need to add an option for it to unionfs-fuse itself, once we switch to libfuse3 (which we probably need to do soon)
Basically, the modified version that I'm planning to do would check the PID of the calling process before opening files. If such PID is not registered in a global index of "known PIDs", the union mount will look like empty to such process. If the PID is registered, then it will get files whose content comes from different source folders depending on the PID (ie: imagine process 720 gets the content of "/src_a/somefile.c" while process 724 gets the content of "/src_b/somefile.c"). So basically, different PIDs would get different union mounts, although they are mounted at the same mountpoint.
This means I'd need to disable kernel caching for the union mount, or otherwise I suppose the two processes in the example would get the same file if it's cached by the OS kernel (I plan to use it both on Mac and Linux, so I might need different ways for getting this lack-of-cache behavior in both OSs).
What functions in unionfs-fuse do you think are the best place for implementing this behavior? (note that this PID-dependent file contents are for a read-only scenario: in fact my processes are not going to write in the union mount)
In the README it's said that "You get caching which speeds things up a lot for free". I'd like that sentence to be explained a bit deeper: Does it mean that the system can cache the contents of files read through unionfs-fuse? If affirmative, can that behaviour be disabled? (I'd like to modify the code of unionfs-fuse for a system where I'd like different processes to see different versions of the files, so if the OS will cache the contents of the files, I guess it will ruin my goal...)
The text was updated successfully, but these errors were encountered: