Revert "storage: add arg to create_snapshot()"

This reverts commit a3e85dae. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent c5365519
...@@ -436,7 +436,7 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname, ...@@ -436,7 +436,7 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
if (!strcmp(orig->type, "btrfs") && !strcmp(new->type, "btrfs")) { if (!strcmp(orig->type, "btrfs") && !strcmp(new->type, "btrfs")) {
bool bret = false; bool bret = false;
if (snap || btrfs_same_fs(orig->dest, new->dest) == 0) if (snap || btrfs_same_fs(orig->dest, new->dest) == 0)
bret = new->ops->create_snapshot(c0->lxc_conf, orig, new, 0); bret = new->ops->create_snapshot(c0->lxc_conf, orig, new);
else else
bret = new->ops->create_clone(c0->lxc_conf, orig, new, 0); bret = new->ops->create_clone(c0->lxc_conf, orig, new, 0);
if (!bret) if (!bret)
......
...@@ -76,7 +76,7 @@ struct bdev_ops { ...@@ -76,7 +76,7 @@ struct bdev_ops {
bool (*create_clone)(struct lxc_conf *conf, struct bdev *orig, bool (*create_clone)(struct lxc_conf *conf, struct bdev *orig,
struct bdev *new, uint64_t newsize); struct bdev *new, uint64_t newsize);
bool (*create_snapshot)(struct lxc_conf *conf, struct bdev *orig, bool (*create_snapshot)(struct lxc_conf *conf, struct bdev *orig,
struct bdev *new, uint64_t newsize); struct bdev *new);
bool can_snapshot; bool can_snapshot;
bool can_backup; bool can_backup;
}; };
......
...@@ -464,7 +464,7 @@ bool btrfs_create_clone(struct lxc_conf *conf, struct bdev *orig, ...@@ -464,7 +464,7 @@ bool btrfs_create_clone(struct lxc_conf *conf, struct bdev *orig,
} }
bool btrfs_create_snapshot(struct lxc_conf *conf, struct bdev *orig, bool btrfs_create_snapshot(struct lxc_conf *conf, struct bdev *orig,
struct bdev *new, uint64_t newsize) struct bdev *new)
{ {
int ret; int ret;
......
...@@ -416,6 +416,6 @@ int btrfs_snapshot_wrapper(void *data); ...@@ -416,6 +416,6 @@ int btrfs_snapshot_wrapper(void *data);
bool btrfs_create_clone(struct lxc_conf *conf, struct bdev *orig, bool btrfs_create_clone(struct lxc_conf *conf, struct bdev *orig,
struct bdev *new, uint64_t newsize); struct bdev *new, uint64_t newsize);
bool btrfs_create_snapshot(struct lxc_conf *conf, struct bdev *orig, bool btrfs_create_snapshot(struct lxc_conf *conf, struct bdev *orig,
struct bdev *new, uint64_t newsize); struct bdev *new);
#endif // __LXC_BTRFS_H #endif // __LXC_BTRFS_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment