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

Pavel Emelyanov xemul at virtuozzo.com
Fri May 13 06:36:48 PDT 2016


On 05/13/2016 01:34 AM, Andrey Vagin wrote:
> 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.

Question -- why not use file descriptor always?

> 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
> 



More information about the CRIU mailing list