]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
storage: add arg to create_snapshot()
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 19 Jul 2017 00:23:55 +0000 (02:23 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 31 Jul 2017 21:34:15 +0000 (23:34 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/bdev/bdev.c
src/lxc/bdev/bdev.h
src/lxc/bdev/lxcbtrfs.c
src/lxc/bdev/lxcbtrfs.h

index 9d8c0172bc742ec3100d795b5cc829a778758f59..1b6b5835da675f345af787b076a9f4352674f710 100644 (file)
@@ -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)
index 5a14e33763136096ba818f7feda1d4711bd65d61..15d46502f087d4d29a12238e8d7cfc613d1be980 100644 (file)
@@ -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;
 };
index 0a9cf913361073a6ba4c73a8c2cea7d5a2c7909d..56673a0fcabf8d0fa84e8478cd5403f75a7eeb52 100644 (file)
@@ -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;
 
index 13b48399405bec5e01dfeda959584ef3c1721bdd..0069245e8e0d848bb29975a8317c8cf56e6308ce 100644 (file)
@@ -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