[CRIU] [PATCH] mount: rework perparation for pivot_root

Andrew Vagin avagin at parallels.com
Wed Sep 3 21:23:01 PDT 2014


On Wed, Sep 03, 2014 at 08:43:13PM +0400, Pavel Emelyanov wrote:
> On 08/08/2014 04:18 PM, Andrey Vagin wrote:
> > We can't bind-mount the required root into itself instead of
> > resolving a parent mount.
> > 
> > This patch is required to support userns, because if we want to make
> > pivot_root, the parent mount can't be locked. When we create userns
> > and mntns, all inherited mounts are marked as locked.
> > 
> > Cc: Tycho Andersen <tycho.andersen at canonical.com>
> > Signed-off-by: Andrey Vagin <avagin at openvz.org>
> 
> Andrey, Tycho,
> 
> AFAIU we haven't yet decided what to do with the root mountpoint
> preparation. Am I right? Can we resurrect the discussion if it's
> still relevant?

You can take the first version of this patch (the start
point of this discussion). It removes collect_mounts() from the
pivot_root case and it allows to make pivot_root, if the root
overmounts smth.

In addition it will be required to support userns. When we create a new
userns, all mounts a marked as locked and they can't be umounted of
moved.

> 
> Thanks,
> Pavel
> 


More information about the CRIU mailing list