[CRIU] [PATCH 0/4] restore: handle a case when some mounts are overmounted
Andrey Vagin
avagin at openvz.org
Fri May 13 08:17:48 PDT 2016
On Fri, May 13, 2016 at 6:36 AM, Pavel Emelyanov <xemul at virtuozzo.com> wrote:
> 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?
It can't handle a second case or you will need to open a file
descriptor for each bind-mount, because each of them can bind-mount
different parts of a file system.
mi->bind (source mount) can be set a few times and you will need to
open a new descriptor each time. It occurs when we mount a first mount
in a shared group. In this case we change mi->bind for all members
from this group.
>
>> 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