From: Christian Brauner Date: Wed, 19 Jul 2017 00:23:55 +0000 (+0200) Subject: storage: add arg to create_snapshot() X-Git-Tag: lxc-2.1.0~32^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53e50ae80f73f0704f6e5f79b84a9b399a6a0f49;p=thirdparty%2Flxc.git storage: add arg to create_snapshot() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/bdev/bdev.c b/src/lxc/bdev/bdev.c index 9d8c0172b..1b6b5835d 100644 --- a/src/lxc/bdev/bdev.c +++ b/src/lxc/bdev/bdev.c @@ -436,7 +436,7 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname, if (!strcmp(orig->type, "btrfs") && !strcmp(new->type, "btrfs")) { bool bret = false; if (snap || btrfs_same_fs(orig->dest, new->dest) == 0) - bret = new->ops->create_snapshot(c0->lxc_conf, orig, new); + bret = new->ops->create_snapshot(c0->lxc_conf, orig, new, 0); else bret = new->ops->create_clone(c0->lxc_conf, orig, new, 0); if (!bret) diff --git a/src/lxc/bdev/bdev.h b/src/lxc/bdev/bdev.h index 5a14e3376..15d46502f 100644 --- a/src/lxc/bdev/bdev.h +++ b/src/lxc/bdev/bdev.h @@ -76,7 +76,7 @@ struct bdev_ops { bool (*create_clone)(struct lxc_conf *conf, struct bdev *orig, struct bdev *new, uint64_t newsize); bool (*create_snapshot)(struct lxc_conf *conf, struct bdev *orig, - struct bdev *new); + struct bdev *new, uint64_t newsize); bool can_snapshot; bool can_backup; }; diff --git a/src/lxc/bdev/lxcbtrfs.c b/src/lxc/bdev/lxcbtrfs.c index 0a9cf9133..56673a0fc 100644 --- a/src/lxc/bdev/lxcbtrfs.c +++ b/src/lxc/bdev/lxcbtrfs.c @@ -467,7 +467,7 @@ bool btrfs_create_clone(struct lxc_conf *conf, struct bdev *orig, } bool btrfs_create_snapshot(struct lxc_conf *conf, struct bdev *orig, - struct bdev *new) + struct bdev *new, uint64_t newsize) { int ret; diff --git a/src/lxc/bdev/lxcbtrfs.h b/src/lxc/bdev/lxcbtrfs.h index 13b483994..0069245e8 100644 --- a/src/lxc/bdev/lxcbtrfs.h +++ b/src/lxc/bdev/lxcbtrfs.h @@ -416,6 +416,6 @@ int btrfs_snapshot_wrapper(void *data); bool btrfs_create_clone(struct lxc_conf *conf, struct bdev *orig, struct bdev *new, uint64_t newsize); bool btrfs_create_snapshot(struct lxc_conf *conf, struct bdev *orig, - struct bdev *new); + struct bdev *new, uint64_t newsize); #endif // __LXC_BTRFS_H