[CRIU] [PATCH 00/39] Restore nested mount namespaces (v6)
Andrey Vagin
avagin at openvz.org
Mon Apr 21 07:23:10 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
v3: don't leak fd on error path in dump_mnt_ns()
v4: fix Pavel's comments.
v5: don't use the set_exec_env pattern.
v6: fix Pavel's comments
Andrey Vagin (38):
mount: close old descriptor in mntns_collect_root
mounts: initialize root before dumping mount namespace
mounts: allow to customize root path for cr_pivot_root (v2)
restore: add mount id-s in the ns_ids list (v4)
mounts: mark local root-s in the list of mount points (v2)
mounts: connect sub-root to the main root
mounts: share one root for all namespaces
mount: read information about all mount namespaces
mounts: create a temporary directory for restoring non-root mntns (v2)
crtools: restore nested mount namespaces (v2)
mount: allow to dump and restore nested mount namespaces (v3)
criu: rename current_ns_mask to root_ns_mask (v2)
zdtm/mountpoints: test nested mount namespaces
namespaces: dump mount namespaces before tasks (v2)
zdtm: mark all mounts as private for one call
zdtm: reexec the mountpoints test in a target mntns
files: save mnt_id on fd_param
files: save mnt_id for reg files
files-ids: generate id-s accoding with mnt_id, st->st_dev and
st->st_ino
restore: close PROC_FD_OFF before calling sigreturn
mount: return descriptor from mntns_collect_root
mount: save mount tree for each namespace
mount: move dump_mnt_namespaces in mount.c
mount: separate collect_mnt_ns from dump_mnt_ns
resotre: collect mounts of current mntns
mount: set nsid for each mount point
mounts: mntns_collect_root in __open_mountpoint
irmap: mntns_collect_root in irmap_lookup
mount: add a function to get a temporary root for mntns
mount: use per-ns list of mount-points in clean_mnt_ns and free_mnt_ns
check: collect mounts of the current mntns
mount: prepare to work without mnt_id
restore: set buildinfo_tree for each mount namespace
mount: use per-namespace mntinfo_tree (v2)
mount: don't open the same root twise
zdtm: check opened files in a second mntns
check: check the mnt_id field in fdinfo
mount: prevent dumping nested mount namespace without mnt_id in fdinfo
cr-check.c | 38 ++-
cr-dump.c | 76 +++--
cr-restore.c | 51 +++-
file-ids.c | 32 ++-
files-reg.c | 81 ++++--
files.c | 3 +-
include/file-ids.h | 5 +-
include/files.h | 2 +
include/mount.h | 20 +-
include/namespaces.h | 13 +-
include/proc_parse.h | 6 +-
include/pstree.h | 2 +
include/syscall-types.h | 3 +
irmap.c | 4 +
mount.c | 547 +++++++++++++++++++++++++++++-------
namespaces.c | 59 +++-
net.c | 4 +-
proc_parse.c | 4 +-
protobuf/regfile.proto | 1 +
pstree.c | 29 +-
sk-tcp.c | 8 +-
sk-unix.c | 13 +-
sockets.c | 2 +-
test/zdtm.sh | 1 +
test/zdtm/lib/test.c | 18 +-
test/zdtm/live/static/mountpoints.c | 113 ++++++--
tun.c | 2 +-
27 files changed, 894 insertions(+), 243 deletions(-)
--
1.8.5.3
More information about the CRIU
mailing list