Comment 18 for bug 1535150

Revision history for this message
Seth Forshee (sforshee) wrote : Re: [Bug 1535150] Re: overlayfs over fuse should refuse copy_up of files if uid/gid not mapped

On Sun, Jan 31, 2016 at 08:07:44AM -0000, halfdog wrote:
> Checking wily: is this behavior intended?
> * Mount fuse-fs to a/b/
> * Enter namespace
> * List content of a/b/ -> works
> * Create overlay with lower=a to c
> * DIrectory c/b/ (fuse mountpoint) now visible but not content of old a/b/ (fuse files)
>
> I just can't see, which part of the patches allows this to work when
> lower=a/b but not with lower=a.

First, I'll point out that this behavior is not a result of these
patches. You'll get the same behavior running a kernel from the archive,
or if a/b/ is a loopback mount instead of a fuse mount.

I'd have to look into it more to be certain, but I'm pretty sure this is
because overlayfs creates a private clone of the mount of lowerdir (and
upperdir as well) but does not clone the child mounts of that mount.
When your filesystem is mounted on lowerdir itself it's this mount that
gets cloned, thus the files are there. When it's mounted in a
subdirectory your fuse mount does not get cloned thus you do not see it
in the overlayfs mount.