[CRIU] [PATCH 0/4] restore: handle a case when some mounts are overmounted

Andrey Vagin avagin at openvz.org
Thu May 12 15:34:53 PDT 2016


From: Andrew Vagin <avagin at virtuozzo.com>

Here are two hacks how to handle this problem:
1. If a whole mount is overmounted, we use a file descriptor to access it
2. If only a part is overmountecd, we create a copyt of this mount without children.

Andrei Vagin (1):
  mount: create a clean mount only when it's required
  [v4] mount: open a mount point if it's going to be overmounted
  mount: return a relative path from cut_root_for_bind()
  zdtm: add a test to check a case when two mounts in the same directory

 criu/include/mount.h                  |  1 +
 criu/mount.c                          | 55 ++++++++++++++++++++++++---
 test/zdtm/.gitignore                  |  1 +
 test/zdtm/static/Makefile             |  1 +
 test/zdtm/static/mntns_overmount.c    | 70 +++++++++++++++++++++++++++++++++++
 test/zdtm/static/mntns_overmount.desc |  1 +
 6 files changed, 123 insertions(+), 6 deletions(-)
 create mode 100644 test/zdtm/static/mntns_overmount.c
 create mode 100644 test/zdtm/static/mntns_overmount.desc

-- 
2.7.4



More information about the CRIU mailing list