• Kirill Tkhai's avatar
    mount: Forced mount unmounted binfmt_misc to do not lost its content · f5876445
    Kirill Tkhai authored
    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: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    f5876445
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
lib Loading commit data...
scripts Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...