summaryrefslogtreecommitdiffstats
path: root/lib/metadata/snapshot_manip.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2011-12-20 00:02:18 +0000
committerAlasdair Kergon <agk@redhat.com>2011-12-20 00:02:18 +0000
commit66e5b7f53c6e96de8620bcdd0181c573bd2a8369 (patch)
tree7c92859a6b7edc6749c60a7c350ac19b5005f58a /lib/metadata/snapshot_manip.c
parent90b7423846593ada69d347dc0574136012cc8b91 (diff)
downloadlvm2-66e5b7f53c6e96de8620bcdd0181c573bd2a8369.tar.gz
lvm2-66e5b7f53c6e96de8620bcdd0181c573bd2a8369.tar.xz
lvm2-66e5b7f53c6e96de8620bcdd0181c573bd2a8369.zip
Reinstate support for format1 snapshots, but issue deprecated warning.
I anticipate removing support for snapshots with lvm1-formatted metadata in a future release.
Diffstat (limited to 'lib/metadata/snapshot_manip.c')
-rw-r--r--lib/metadata/snapshot_manip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/metadata/snapshot_manip.c b/lib/metadata/snapshot_manip.c
index 12ac9de5..5766d0b1 100644
--- a/lib/metadata/snapshot_manip.c
+++ b/lib/metadata/snapshot_manip.c
@@ -208,6 +208,10 @@ int vg_remove_snapshot(struct logical_volume *cow)
cow->snapshot = NULL;
lv_set_visible(cow);
+ /* format1 must do the change in one step, with the commit last. */
+ if (!(origin->vg->fid->fmt->features & FMT_MDAS))
+ return 1;
+
if (!vg_write(origin->vg))
return_0;
if (!suspend_lv(origin->vg->cmd, origin)) {