[CRIU] [PATCH v6 0/7] Save content of unmounted binfmt_misc

Kirill Tkhai ktkhai at virtuozzo.com
Tue Aug 23 09:16:13 PDT 2016


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

This patch forces mounting of unmounted binfmt_misc on dump, and make it
restore in the right way. 

v2: Cleanup mounted binfmt_misc in case of dump failed.
    Use get_fd_mntid().
    Print more info in error case.
v3: Close dir before umounting.
v4: Do not save temporary mountpoint in image.
    Add fix 0/3
v5: New patches 1-3.
    Do not search for binfmt_misc mounted: use opts.has_binfmt_misc.
    Do not count number of entries in binfmt_misc directory.
v6: New patches 1-3.
    Use {open,close}_image sequence to determ if image exists.
    Introduce binfmt_misc_list and iterate over it on restore.
    Add CRTIME_MNT_ID.
    Make mount function generic.
    Check for binfmt_misc_list to determine if binfmt_misc image present.
---

Kirill Tkhai (7):
      image: Rename binfmt_misc image format as "old"
      mount: Collect new type binfmt_misc.img image entries
      mount: Move binfmt_misc entry restore code to subfunction
      mount: Create binfmt_misc image w/o device suffix
      mount: Autodetect binfmt_misc
      mount: Forced mount unmounted binfmt_misc to do not lost its content
      mount: Restore binfmt_misc content in case of missing mount


 criu/cr-dump.c            |    1 
 criu/cr-restore.c         |    3 +
 criu/image-desc.c         |    3 -
 criu/include/cr_options.h |    1 
 criu/include/image-desc.h |    1 
 criu/include/magic.h      |    1 
 criu/include/mount.h      |    2 
 criu/mount.c              |  265 +++++++++++++++++++++++++++++++++++++++++----
 8 files changed, 251 insertions(+), 26 deletions(-)

--
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>


More information about the CRIU mailing list