Revert "storage: rework lvm backend"

This reverts commit 9a534c22. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 115dd89d
...@@ -138,8 +138,8 @@ static const struct bdev_ops lvm_ops = { ...@@ -138,8 +138,8 @@ static const struct bdev_ops lvm_ops = {
.clone_paths = &lvm_clonepaths, .clone_paths = &lvm_clonepaths,
.destroy = &lvm_destroy, .destroy = &lvm_destroy,
.create = &lvm_create, .create = &lvm_create,
.create_clone = &lvm_create_clone, .create_clone = NULL,
.create_snapshot = &lvm_create_snapshot, .create_snapshot = NULL,
.can_snapshot = true, .can_snapshot = true,
.can_backup = false, .can_backup = false,
}; };
...@@ -444,19 +444,6 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname, ...@@ -444,19 +444,6 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
return new; return new;
} }
if (!strcmp(orig->type, "lvm") && !strcmp(new->type, "lvm")) {
bool bret = false;
if (snap)
bret = new->ops->create_snapshot(c0->lxc_conf, orig,
new, newsize);
else
bret = new->ops->create_clone(c0->lxc_conf, orig, new,
newsize);
if (!bret)
return NULL;
return new;
}
if (strcmp(bdevtype, "btrfs")) { if (strcmp(bdevtype, "btrfs")) {
if (!strcmp(new->type, "overlay") || if (!strcmp(new->type, "overlay") ||
!strcmp(new->type, "overlayfs")) !strcmp(new->type, "overlayfs"))
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#define __LXC_LVM_H #define __LXC_LVM_H
#define _GNU_SOURCE #define _GNU_SOURCE
#include <stdbool.h>
#include <stdint.h> #include <stdint.h>
/* defined in bdev.h */ /* defined in bdev.h */
...@@ -53,9 +52,5 @@ int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname, ...@@ -53,9 +52,5 @@ int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
int lvm_destroy(struct bdev *orig); int lvm_destroy(struct bdev *orig);
int lvm_create(struct bdev *bdev, const char *dest, const char *n, int lvm_create(struct bdev *bdev, const char *dest, const char *n,
struct bdev_specs *specs); struct bdev_specs *specs);
bool lvm_create_clone(struct lxc_conf *conf, struct bdev *orig,
struct bdev *new, uint64_t newsize);
bool lvm_create_snapshot(struct lxc_conf *conf, struct bdev *orig,
struct bdev *new, uint64_t newsize);
#endif /* __LXC_LVM_H */ #endif /* __LXC_LVM_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