[CRIU] [PATCH cr 00/12] care about pid namespaces (v2)

Andrey Vagin avagin at openvz.org
Thu May 31 08:58:20 EDT 2012


Prepare to dump LXC containers. All processes of such CT live in
a separate pid namespace.
I suppose that we will start to dump from "init", which has pid = 1.

When we are dumping a process we actually have two pids.
real_pid - a pid of a process in crtools's pid ns.
pid - a pid in CT's pid namespace. This pid will be restored

Andrey Vagin (12):
  syscall: add +__NR_getpgid +__NR_getsid
  ctrools: prepare to dump pid namespace
  parasite: add ability to get pid and tid
  cr-dump: split collect_dump_pstree to collect and dump
  restore: create pid namespace
  cr-dump: dump pstree after tasks
  dump: move check_xids to dump_pstree
  namespaces: dump_namespaces get a struct pid as argument
  dump: split real_pid and pid in struct pid
  util: add ability to change a proc mount point
  shmem: used open_proc_rw to open proc files
  restore: mount proc for a new pid namespace

 cr-dump.c                  |  163 ++++++++++++++++++++++++--------------------
 cr-restore.c               |   91 ++++++++++++++++++-------
 cr-show.c                  |   12 ++--
 files.c                    |    4 +-
 include/crtools.h          |   10 ++-
 include/namespaces.h       |    5 +-
 include/parasite-syscall.h |    4 +-
 include/parasite.h         |    7 ++-
 include/syscall-x86-64.def |    2 +
 include/util.h             |    1 +
 namespaces.c               |   14 ++--
 parasite-syscall.c         |    4 +-
 parasite.c                 |    6 ++
 shmem.c                    |    2 +-
 util.c                     |    8 ++-
 15 files changed, 211 insertions(+), 122 deletions(-)


More information about the CRIU mailing list