Blame SOURCES/lvm2-2_02_187-snapshot-use-single-merging-sequence.patch

b83e05
 lib/metadata/snapshot_manip.c | 19 +------------------
b83e05
 1 file changed, 1 insertion(+), 18 deletions(-)
b83e05
b83e05
diff --git a/lib/metadata/snapshot_manip.c b/lib/metadata/snapshot_manip.c
b83e05
index 156b4c8..63e3361 100644
b83e05
--- a/lib/metadata/snapshot_manip.c
b83e05
+++ b/lib/metadata/snapshot_manip.c
b83e05
@@ -286,7 +286,6 @@ int vg_add_snapshot(struct logical_volume *origin,
b83e05
 
b83e05
 int vg_remove_snapshot(struct logical_volume *cow)
b83e05
 {
b83e05
-	int merging_snapshot = 0;
b83e05
 	struct logical_volume *origin = origin_from_cow(cow);
b83e05
 	int is_origin_active = lv_is_active(origin);
b83e05
 
b83e05
@@ -315,17 +314,6 @@ int vg_remove_snapshot(struct logical_volume *cow)
b83e05
 		 * preload origin IFF "snapshot-merge" target is active
b83e05
 		 * - IMPORTANT: avoids preload if inactivate merge is pending
b83e05
 		 */
b83e05
-		if (lv_has_target_type(origin->vg->vgmem, origin, NULL,
b83e05
-				       TARGET_NAME_SNAPSHOT_MERGE)) {
b83e05
-			/*
b83e05
-			 * preload origin to:
b83e05
-			 * - allow proper release of -cow
b83e05
-			 * - avoid allocations with other devices suspended
b83e05
-			 *   when transitioning from "snapshot-merge" to
b83e05
-			 *   "snapshot-origin after a merge completes.
b83e05
-			 */
b83e05
-			merging_snapshot = 1;
b83e05
-		}
b83e05
 	}
b83e05
 
b83e05
 	if (!lv_remove(cow->snapshot->lv)) {
b83e05
@@ -367,7 +355,7 @@ int vg_remove_snapshot(struct logical_volume *cow)
b83e05
 		 * the LV lock on cluster has to be grabbed, so use
b83e05
 		 * activate_lv() which resumes suspend cow device.
b83e05
 		 */
b83e05
-		if (!merging_snapshot && !activate_lv(cow->vg->cmd, cow)) {
b83e05
+		if (!activate_lv(cow->vg->cmd, cow)) {
b83e05
 			log_error("Failed to activate %s.", cow->name);
b83e05
 			return 0;
b83e05
 		}
b83e05
@@ -376,11 +364,6 @@ int vg_remove_snapshot(struct logical_volume *cow)
b83e05
 			log_error("Failed to resume %s.", origin->name);
b83e05
 			return 0;
b83e05
 		}
b83e05
-
b83e05
-		if (merging_snapshot && !activate_lv(cow->vg->cmd, cow)) {
b83e05
-			log_error("Failed to activate %s.", cow->name);
b83e05
-			return 0;
b83e05
-		}
b83e05
 	}
b83e05
 
b83e05
 	return 1;