[CRIU] [PATCH 00/13] Restore nested mount namespaces (v2)
Andrey Vagin
avagin at openvz.org
Tue Mar 11 08:18:16 PDT 2014
Systemd is able to execute a service in a new mount namespace.
It's used by Fedora and probably will be used in RHEL7.
All nested mount namespaces are restored as sub-trees of the root
namespace. A namespace is restored by a task with minimal pid in this
namespace. The task unshares mount namespace and makes pivot_root in a
proper sub-tree. All other task from the namespace attaches to the
namespace by calling setns().
v2: write more descriptive comments
Andrey Vagin (13):
crtools: close all desriptors only for the root task
mounts: initialize root before dumping mount namespace
namespace: move struct ns_id into namespace.h
mounts: allow to customize root path for cr_pivot_root
restore: add mount id-s in the ns_ids list (v2)
mounts: mark local root-s in the list of mount points
mounts: connect sub-root to the main root
mounts: bind mount one root for all namespaces
mounts: prepare to create a temporary directory for restoring non-root
mntns
mounts: create a temporary directory for restoring non-root mntns
crtools: restore nested mount namespaces
mount: allow to dump and restore nested mount namespaces
criu: rename current_ns_mask to root_ns_mask
cr-dump.c | 10 +-
cr-restore.c | 51 ++++++---
include/mount.h | 4 +
include/namespaces.h | 15 ++-
include/proc_parse.h | 1 +
include/servicefd.h | 1 +
mount.c | 294 ++++++++++++++++++++++++++++++++++++++++++++-------
namespaces.c | 62 ++++++++---
net.c | 4 +-
pstree.c | 32 ++++--
sk-tcp.c | 8 +-
sockets.c | 2 +-
tun.c | 2 +-
util.c | 13 +++
14 files changed, 409 insertions(+), 90 deletions(-)
--
1.8.5.3
More information about the CRIU
mailing list