Skip to content
Commit f5876445 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Pavel Emelyanov
Browse files

mount: Forced mount unmounted binfmt_misc to do not lost its content



Umount does not remove binfmt_misc content. If it's mounted once again,
the same entries remain registered.

Criu does not dump content of umounted binfmt_misc. So, after C/R we
lose it at all.

This patch forces mounting of unmounted binfmt_misc after we collected
mountpoints. If it's unmounted, we mount it back and add this mount
to the tree of collected mounted mountpoints. Further, binfmt_misc
content is dumped in usual way with the only difference, that mount
point itself is not dumped.

v2: Print error in case of umount() fail.
    Move add_forced_mount() to another patch.
v3: Close binfmt_misc dir before its umount().
v4: Do not dump forced mounted mountpoint.
v5: Do not search for binfmt_misc mounted: use opts.has_binfmt_misc.
    Do not count number of entries in binfmt_misc directory.
v6: Add CRTIME_MNT_ID.
    Make mount function generic.

Signed-off-by: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@virtuozzo.com>
parent fbeb3acc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment