[CRIU] [PATCH] mount: don't dump content for external mounts
Andrei Vagin
avagin at openvz.org
Wed Mar 22 22:12:12 PDT 2017
From: Andrei Vagin <avagin at virtuozzo.com>
External mounts are provided by an user and CRIU doesn't
need to restore their content.
https://github.com/xemul/criu/issues/299
Reported-by: Stéphane Graber
Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
criu/mount.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/criu/mount.c b/criu/mount.c
index 736eaf4..e04893b 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -1263,13 +1263,14 @@ 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 (!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);
--
2.7.4
More information about the CRIU
mailing list