[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [PATCH 5/6] Add some missing vg_revrts calls when pvmove aborts.



---
 tools/pvmove.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tools/pvmove.c b/tools/pvmove.c
index 47982e6..a286db1 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -303,8 +303,10 @@ static int _update_metadata(struct cmd_context *cmd, struct volume_group *vg,
 	}
 
 	/* Suspend lvs_changed */
-	if (!suspend_lvs(cmd, lvs_changed))
+	if (!suspend_lvs(cmd, lvs_changed)) {
+		vg_revert(vg);
 		goto_out;
+	}
 
 	/* Suspend mirrors on subsequent calls */
 	if (!first_time) {
@@ -324,6 +326,7 @@ static int _update_metadata(struct cmd_context *cmd, struct volume_group *vg,
 				stack;
 		if (!resume_lvs(cmd, lvs_changed))
 			stack;
+		vg_revert(vg);
 		goto out;
 	}
 
-- 
1.6.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]