mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
mount: do not detect non-fsroot mounts as device-external
Device-external mounts are restored via do_new_mount(), but function do_new_mount only allows creating mounts with root "/", as it does simple mount (not bind) without any later root change. Restoring non-root mounts via do_new_mount is just imposible. So let's detect mounts as device-external only when they have fsroot root, all other non-fsroot binds of this device would be restored as bindmounts of fsroot ones. This is a cosmetic change as though non-root mounts were detected as device-external before this patch they anyway would not be created with do_new_mount() because of fsroot/bind check in can_mount_now orders them to be restored as binds. Cherry-picked one hunk from Virtuozzo criu: https://src.openvz.org/projects/OVZ/repos/criu/commits/afd899539 Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
eda1e5fdbd
commit
e17c1cc128
@@ -476,7 +476,7 @@ static int try_resolve_ext_mount(struct mount_info *info)
|
||||
|
||||
snprintf(devstr, sizeof(devstr), "dev[%d/%d]", kdev_major(info->s_dev), kdev_minor(info->s_dev));
|
||||
|
||||
if (info->fstype->code == FSTYPE__UNSUPPORTED) {
|
||||
if (info->fstype->code == FSTYPE__UNSUPPORTED && fsroot_mounted(info)) {
|
||||
char *val;
|
||||
|
||||
val = external_lookup_by_key(devstr);
|
||||
|
Reference in New Issue
Block a user