Blame SOURCES/lvm2-2_02_178-mirror-Add-deprecation-warning-for-mirrored-log.patch

f0aa83
 WHATS_NEW             |  1 +
f0aa83
 lib/metadata/mirror.c |  4 ++++
f0aa83
 tools/lvconvert.c     | 11 ++++++++---
f0aa83
 3 files changed, 13 insertions(+), 3 deletions(-)
f0aa83
f0aa83
diff --git a/WHATS_NEW b/WHATS_NEW
f0aa83
index da10eed..762553f 100644
f0aa83
--- a/WHATS_NEW
f0aa83
+++ b/WHATS_NEW
f0aa83
@@ -1,5 +1,6 @@
f0aa83
 Version 2.02.178 - 
f0aa83
 =====================================
f0aa83
+  Add deprecate messages for usage of mirrors with mirrorlog.
f0aa83
   Restore pvmove support for wide-clustered active volumes (2.02.177).
f0aa83
   Avoid non-exclusive activation of exclusive segment types.
f0aa83
   Fix trimming sibling PVs when doing a pvmove of raid subLVs.
f0aa83
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
f0aa83
index 38c3df6..4a0e99f 100644
f0aa83
--- a/lib/metadata/mirror.c
f0aa83
+++ b/lib/metadata/mirror.c
f0aa83
@@ -1945,6 +1945,10 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
f0aa83
 		return 1;
f0aa83
 	}
f0aa83
 
f0aa83
+	if (log_count > 1) {
f0aa83
+		log_warn("WARNING: Log type \"mirrored\" is DEPRECATED and will be removed in the future. Use RAID1 LV or disk log instead.");
f0aa83
+	}
f0aa83
+
f0aa83
 	if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0)))
f0aa83
 		return_0;
f0aa83
 
f0aa83
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
f0aa83
index fee0a4e..8006699 100644
f0aa83
--- a/tools/lvconvert.c
f0aa83
+++ b/tools/lvconvert.c
f0aa83
@@ -686,7 +686,7 @@ static void _remove_missing_empty_pv(struct volume_group *vg, struct dm_list *re
f0aa83
 			stack;
f0aa83
 			return;
f0aa83
 		}
f0aa83
-		log_warn("%d missing and now unallocated Physical Volumes removed from VG.", removed);
f0aa83
+		log_warn("WARNING: %d missing and now unallocated Physical Volumes removed from VG.", removed);
f0aa83
 	}
f0aa83
 }
f0aa83
 
f0aa83
@@ -828,7 +828,7 @@ static int _lvconvert_mirrors_aux(struct cmd_context *cmd,
f0aa83
 	uint32_t old_log_count = _get_log_count(lv);
f0aa83
 
f0aa83
 	if ((lp->mirrors == 1) && !lv_is_mirrored(lv)) {
f0aa83
-		log_warn("Logical volume %s is already not mirrored.",
f0aa83
+		log_warn("WARNING: Logical volume %s is already not mirrored.",
f0aa83
 			 display_lvname(lv));
f0aa83
 		return 1;
f0aa83
 	}
f0aa83
@@ -1100,7 +1100,7 @@ static int _lvconvert_mirrors_repair(struct cmd_context *cmd,
f0aa83
 	log_count = replace_logs ? original_logs : (original_logs - failed_logs);
f0aa83
 
f0aa83
 	while (replace_mimages || replace_logs) {
f0aa83
-		log_warn("Trying to up-convert to %d images, %d logs.", lp->mirrors, log_count);
f0aa83
+		log_warn("WARNING: Trying to up-convert to %d images, %d logs.", lp->mirrors, log_count);
f0aa83
 		if (_lvconvert_mirrors_aux(cmd, lv, lp, NULL,
f0aa83
 					   lp->mirrors, log_count, pvh))
f0aa83
 			break;
f0aa83
@@ -1216,6 +1216,11 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
f0aa83
 	    (old_log_count == new_log_count))
f0aa83
 		return 1;
f0aa83
 
f0aa83
+	if ((old_log_count != new_log_count) &&
f0aa83
+	    (new_log_count == MIRROR_LOG_MIRRORED)) {
f0aa83
+		log_warn("WARNING: Log type \"mirrored\" is DEPRECATED and will be removed in the future. Use RAID1 LV or disk log instead.");
f0aa83
+	}
f0aa83
+
f0aa83
 	if (!_lvconvert_mirrors_aux(cmd, lv, lp, NULL,
f0aa83
 				    new_mimage_count, new_log_count, lp->pvh))
f0aa83
 		return_0;