Re: [PATCH 3/7] shared subtree

Miklos Szeredi
2005-07-28T08:36:06Z

> yes we agreed on returning EINVAL when a directory is attempted to made
> shared/private/slave/unclonnable. But this is a different case.
>
> lets say /mnt is a mountpoint having a vfsmount (say A).
> now if you run
> mount --bind /mnt/a /tmp
> this operation succeeds currently.
>
> now lets say /mnt is a mountpoint having a vfsmount which is shared.
> now if you run
> mount --bind /mnt/a /tmp
>
> we now have a mount at /tmp which gets propogation from mounts under
> /mnt/a. right?

Yes.

> but /mnt/a is not a mountpoint at all. if we need to track and
> propogate mounts/unmounts under /tmp or /mnt/a we need to have a mount
> at /mnt/a.

I don't think we do. You can just check at propagation time if the
propagated mountpoint is visible in the destination mount or not.
Just like --rbind checks whether children mounts are below or above
the to-be-bound directory.

Miklos