mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
mount: rework skipping external mounts in dump_one_mountpoint
Function dump_one_fs already has mnt_is_external_bind check inside, so there is no point to check pm->external one more time. Function check_bindmount is intended to check devpts bindmount's master was opened in right mount namespace, but if bindmount is external mount there is no point to check this. Let's also skip check for bindmounts of external mounts. Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
3b2b808128
commit
685a53eeca
11
criu/mount.c
11
criu/mount.c
@@ -1674,13 +1674,12 @@ static int dump_one_mountpoint(struct mount_info *pm, struct cr_img *img)
|
||||
if (me.fstype == FSTYPE__AUTO)
|
||||
me.fsname = pm->fsname;
|
||||
|
||||
if (!pm->external) {
|
||||
if (!pm->dumped && dump_one_fs(pm))
|
||||
return -1;
|
||||
if (!pm->dumped && dump_one_fs(pm))
|
||||
return -1;
|
||||
|
||||
if (!fsroot_mounted(pm) && pm->fstype->check_bindmount && pm->fstype->check_bindmount(pm))
|
||||
return -1;
|
||||
}
|
||||
if (!mnt_is_external_bind(pm) && !fsroot_mounted(pm) && pm->fstype->check_bindmount &&
|
||||
pm->fstype->check_bindmount(pm))
|
||||
return -1;
|
||||
|
||||
if (pm->mnt_id == CRTIME_MNT_ID) {
|
||||
pr_info("Skip dumping cr-time mountpoint: %s\n", pm->mountpoint);
|
||||
|
Reference in New Issue
Block a user