All of lore.kernel.org
 help / color / mirror / Atom feed
* master - raid: add missing vg_revert
@ 2014-09-12 12:44 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2014-09-12 12:44 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=569184a3bb124f94bc79c1a1d042f686270e7864
Commit:        569184a3bb124f94bc79c1a1d042f686270e7864
Parent:        dd1fa0e808918b51a690e26de8a8cfff6c307854
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Thu Sep 11 19:58:28 2014 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Sep 12 13:45:14 2014 +0200

raid: add missing vg_revert

After failing vg_write() and suspend_lv() there was missing vg_revert() call.
---
 WHATS_NEW                 |    1 +
 lib/metadata/raid_manip.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/WHATS_NEW b/WHATS_NEW
index be549b8..f65d7fb 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.112 - 
 =====================================
+  Add missing vg_revert in suspend_lv() error path in raid target.
   Add missing backup of lvm2 metadata after some raid modifications.
   Use vg memory pool for extent allocation.
   Add allocation/physical_extent_size config option for default PE size of VGs.
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 91cc0dd..989244c 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -938,6 +938,7 @@ static int _raid_remove_images(struct logical_volume *lv,
 	if (!suspend_lv(lv->vg->cmd, lv)) {
 		log_error("Failed to suspend %s/%s before committing changes",
 			  lv->vg->name, lv->name);
+		vg_revert(lv->vg);
 		return 0;
 	}
 
@@ -1113,6 +1114,7 @@ int lv_raid_split(struct logical_volume *lv, const char *split_name,
 	if (!suspend_lv(cmd, lv)) {
 		log_error("Failed to suspend %s/%s before committing changes",
 			  lv->vg->name, lv->name);
+		vg_revert(lv->vg);
 		return 0;
 	}
 



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-12 12:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-12 12:44 master - raid: add missing vg_revert Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.