so that restoring a snapshot of overlayfs container works.
Signed-off-by: Serge Hallyn <[email protected]>
---
src/lxc/lxccontainer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index b0ae44b..4318a12 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -3083,7 +3083,9 @@ static bool lxcapi_snapshot_restore(struct lxc_container
*c, const char *snapnam
return false;
}
- rest = lxcapi_clone(snap, newname, c->config_path, 0, bdev->type, NULL,
0, NULL);
+ rest = lxcapi_clone(snap, newname, c->config_path,
+ LXC_CLONE_SNAPSHOT | LXC_CLONE_MAYBE_SNAPSHOT,
+ bdev->type, NULL, 0, NULL);
bdev_put(bdev);
if (rest && lxcapi_is_defined(rest))
b = true;
--
1.9.0
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel