[CRIU] [PATCH 03/14] mount: rework perparation for pivot_root (v4)
Pavel Emelyanov
xemul at parallels.com
Thu Oct 30 04:59:49 PDT 2014
On 10/16/2014 12:11 AM, 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.
>
> This patch doesn't change properties of the root mount or any other
> mounts of the restored namespace. It is needed to satisfy pivot_root().
>
> v2: don't change properties of the given root
> v3: bind-mount root into itself recursevly
> v4: A parent of the new root may be a shared mount. In a previous
> versions a temporary mount is propogated to its neibours.
>
> Cc: Tycho Andersen <tycho.andersen at canonical.com>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
Let's better require user to prepare valid root himself (again) and
not do black-magic inside criu. This is _restore_. which means, that
we got this state on dump from somewhere. And this "somewhere" had
the root prepared at _that_ time. So before user calls criu restore
hi knows how to make the root and can (and will) do it again.
Thoughts?
Thanks,
Pavel
More information about the CRIU
mailing list