[CRIU] [PATCH 0/2] support restoring ghost files on readonly mounts

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Tue Sep 11 18:53:29 MSK 2018


We have a problem restoring ghost-files on readonly mounts:

Failed to resume the CT: PRL_ERR_VZCTL_OPERATION_FAILED (Details: (04.800253)      1: Error (criu/files-reg.c:381): Can't create ghost regfile: Read-only file system
(04.916178) Error (criu/files-reg.c:868): Couldn't unlink remap 17 lib/x86_64-linux-gnu/libm-2.24.so.dpkg-new.cr.22.ghost: Read-only file system
(04.916190) Error (criu/files-reg.c:868): Couldn't unlink remap 17 lib/x86_64-linux-gnu/libm-2.24.so.dpkg-new.cr.22.ghost: No such file or directory
(04.945551) Error (criu/cr-restore.c:2340): Restoring FAILED.

See description of the first patch for explanation of the fix.

Just to note: I thought about two other possible ways of making these
work: Find a writable bind-mount - but there can be no such a thing, see
the test-patch. Remount the mount writable just before creating ghosts
and remount it back after it - we operate ghosts in three places
(create, give it the right name, remove) so these approach brings a lot
of extra remounts and is hardly a good way.

https://jira.sw.ru/browse/PSBM-82991

Pavel Tikhomirov (2):
  mount: delay restoring readonly mount flag untill all files ready
  zdtm: ghost on readonly fs

 criu/cr-restore.c                   |   2 +
 criu/include/mount.h                |   2 +
 criu/mount.c                        | 112 ++++++++++++++++-
 test/zdtm/static/Makefile           |   1 +
 test/zdtm/static/ghost_on_rofs.c    | 179 ++++++++++++++++++++++++++++
 test/zdtm/static/ghost_on_rofs.desc |   1 +
 6 files changed, 295 insertions(+), 2 deletions(-)
 create mode 100644 test/zdtm/static/ghost_on_rofs.c
 create mode 100644 test/zdtm/static/ghost_on_rofs.desc

-- 
2.17.1



More information about the CRIU mailing list