Re: FUSE merging?

Miklos Szeredi
2005-07-01T17:05:41Z

> > It's not as simple. A filesystem can be mounted many times (either
> > with mount --bind, or just by mounting the same device on multiple
> > mountpoints). In this case you can't ensure, that a mountpoint will
> > remain a leaf node after being mounted on.
>
> I have bind-mounted / on /net/blabla
> I tried two experiments:
>
> mounting something under / and looking for it under /net/blabla
> mounting something under /net/blabla and looking for it under /
>
> The experiment was done with bind mounts and by mounting a USB stick
> (/dev/sdb1) and there was no auto propagation of mounts.

I'm not talking about auto propagation (that's only now being
implemented by Ram Pai, and is not in stock kernels).

What I'm saying is that mounting something over a leaf node, does not
guarantee, that it will remain a leaf node after it's been mounted on.

For example:

mkdir /tmp/leafdir
mkdir /tmp/rootcopy
mount --bind / /tmp/rootcopy
mount /dev/sdb1 /tmp/leafdir
mkdir /tmp/rootcopy/tmp/leafdir/child

Now 'leafdir' is no longer a leaf.

I'm not saying this is a problem, but also I don't see any
overwhelming reason to not allow user mounts over non-leaf
directories.

Miklos