From d29b00d820481e71bfa201c13bb286ad9f82ca3a Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Thu, 23 Mar 2017 08:12:12 +0300 Subject: [PATCH] mount: don't dump content for external mounts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- criu/mount.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/criu/mount.c b/criu/mount.c index 736eaf456..e04893b66 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);