Comments (5)
In general, actually, I don't think this really has anything to do with any of the directories being the same, but probably more specifically, the mountpoint
being not empty.
I think the upperdir
being the same as the mountpoint
might have simply uncovered most of the odd behavior.
from fuse-overlayfs.
I think maybe the application that can't find the file still hold the old fd of the upperdir/mountpoint? IMHO it should be ok for overlayfs (both overlayfs-in-kernel and fuse-overlayfs) to use the upperdir or lowdir or any other non-empty directory as the mountpoint...
Before mounting, we'll get the origin fd of the upperdir when we open the upperdir by path. And after mounting, we would follow/traverse the mount and get the root of overlayfs intead when we open the same path. They are totally different objects in kernel (file/dentry/inode/fs), even though they are opened through the same path/name...
The overlayfs will open directoris of all layers and hold their fd for further access, like writting file to upper-layer, but the user application should drop the origin fd and switch to the new upperdir, then access the newly mounted file system.
from fuse-overlayfs.
I agree, it definitely should be a supported Use Case. If this use case was properly supported, though, it would not necessarily matter if they were holding on to the old fd, given that fuse-overlayfs
should be propagating the changes in bother the upperdir and mountdir appropriately. In other words, writes to the mountdir
should propagate to the upperdir
, and changes to the upperdir
should be adequately reconciled to the mountdir
. This is a complicated mechanism, but it needs attention in this case.
Regardless, unfortunately my extensive testing has shown that the application(s) are not holding onto the old fd of the upperdir/mountpoint. This can be reproduced by mounting the overlayfs at startup before any of the applications that are using the mount point interact with the file system.
Applications opened after the fact still result in corruption of files. I'm actually still uncovering file corruption that's occurred last month on an actively used machine for various applications and purposes. That's definitely concerning and points to some instability in the way that fuse-overlayfs
is currently reconciling changes between the mountdir
and upperdir
.
from fuse-overlayfs.
Related Issues (20)
- File descriptor leak for mmaped files
- v0.7.x release for CentOS 7 HOT 1
- Rootless Overlay Fails With Userns HOT 4
- hide overlapping paths HOT 2
- `tar: .: file changed as we read it` with `fuse-overlayfs` HOT 14
- debug help to indentify partial reads on readonly overlay
- kernel crash (task blocked) when using fuse-overlayfs on tmpfs HOT 2
- change fuse-overlayfs license to GPL2 HOT 35
- Calling fuse-overlayfs in a systemd user service fails to mount anything HOT 3
- Mount with fuse-overlayfs is about 7x slower than mount with /usr/bin/mount HOT 3
- wrong inode on entries read by readdir instead of readdirplus
- Extraneous "/proc seems to be mounted as readonly, it can lead to unexpected failures" HOT 1
- cp's copy_file_range vs read-only files HOT 2
- chown -R on non-empty directory changes mtime
- overlay driver is very slow in podman-in-podman builds with large COPY layer HOT 6
- What are the Supported Options in fuse-overlayfs? HOT 1
- force_mask affects permissions inside container HOT 11
- touch: setting times of 'XXX' : No such file or directory
- mkdir with permissions 0555 fails HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuse-overlayfs.