[CRIU] [PATCH 00/13] Restore nested mount namespaces (v3)

Andrey Vagin avagin at openvz.org
Tue Apr 8 17:13:28 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()

Andrey Vagin (13):
  crtools: close all desriptors only for the root task
  mounts: initialize root before dumping mount namespace
  mounts: allow to customize root path for cr_pivot_root
  restore: add mount id-s in the ns_ids list (v3)
  mounts: mark local root-s in the list of mount points
  mounts: connect sub-root to the main root
  mounts: share one root for all namespaces
  mounts: prepare to create a temporary directory for restoring non-root
    mntns (v2)
  mounts: create a temporary directory for restoring non-root mntns
  crtools: restore nested mount namespaces
  mount: allow to dump and restore nested mount namespaces (v2)
  criu: rename current_ns_mask to root_ns_mask
  zdtm/mountpoints: test nested mount namespaces

 cr-dump.c                           |  10 +-
 cr-restore.c                        |  59 +++++---
 include/mount.h                     |   4 +
 include/namespaces.h                |   6 +-
 include/proc_parse.h                |   1 +
 include/servicefd.h                 |   1 +
 include/syscall-types.h             |   3 +
 mount.c                             | 283 +++++++++++++++++++++++++++++++-----
 namespaces.c                        |  52 ++++++-
 net.c                               |   4 +-
 pstree.c                            |  35 +++--
 sk-tcp.c                            |   8 +-
 sockets.c                           |   2 +-
 test/zdtm/live/static/mountpoints.c |  63 +++++++-
 tun.c                               |   2 +-
 util.c                              |  12 ++
 16 files changed, 458 insertions(+), 87 deletions(-)

--
1.8.5.3



More information about the CRIU mailing list