Skip to contentSkip to conversation

master - cleanup: don't backup twice

PATCH Zdenek Kabelac 1 participant 1 message Oct 24, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f2ea8904239752df231023a4a3aad704ed8edc73
Commit:        f2ea8904239752df231023a4a3aad704ed8edc73
Parent:        a4788b4994f4cbd5bccd411683704b2badf026d7
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Oct 20 21:49:07 2014 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Oct 24 16:39:31 2014 +0200

cleanup: don't backup twice

---
 lib/metadata/lv_manip.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
lib/metadata/lv_manip.c +3 -2
index df696e9..54fc6a8 100644
@@ -7052,8 +7052,9 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
 				stack;
 				goto revert_new_lv;
 			}
-
-			backup(vg);
+			/* When change is activating, don't duplicate backup call */
+			if (!is_change_activating(lp->activate))
+				backup(vg);
 		}
 		if (is_change_activating(lp->activate)) {
 			/* Send message so that table preload knows new thin */