Blame SOURCES/0002-lvextend-fix-overprovisioning-check-for-thin-lvs.patch

337b9c
From 20c6961e37bf6f5010f9d2035dbc1ce03f9b0223 Mon Sep 17 00:00:00 2001
337b9c
From: David Teigland <teigland@redhat.com>
337b9c
Date: Thu, 15 Dec 2022 09:57:04 -0600
337b9c
Subject: [PATCH] lvextend: fix overprovisioning check for thin lvs
337b9c
337b9c
18722dfdf4d3 lvresize: restructure code
337b9c
mistakenly changed the overprovisioning check from applying
337b9c
to all lv_is_thin_type lvs to only lv_is_thin_pool lvs, so
337b9c
it no longer applied when extending thin lvs.  The result
337b9c
was missing warning messages when extending thin lvs.
337b9c
337b9c
(cherry picked from commit 4baef0f93f608403b6f2db445e7bf1e80f8f3ee6)
337b9c
---
337b9c
 lib/metadata/lv_manip.c | 5 +++--
337b9c
 1 file changed, 3 insertions(+), 2 deletions(-)
337b9c
337b9c
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
337b9c
index 4cdbc19a0..f8eae0447 100644
337b9c
--- a/lib/metadata/lv_manip.c
337b9c
+++ b/lib/metadata/lv_manip.c
337b9c
@@ -7007,9 +7007,10 @@ int lv_resize(struct cmd_context *cmd, struct logical_volume *lv,
337b9c
 	if (lv_is_thin_pool(lv_top)) {
337b9c
 		if (!update_thin_pool_lv(lv_top, 1))
337b9c
 			goto_out;
337b9c
-		if (is_extend)
337b9c
-			thin_pool_check_overprovisioning(lv_top);
337b9c
 	}
337b9c
+	if (lv_is_thin_type(lv_top) && is_extend)
337b9c
+		thin_pool_check_overprovisioning(lv_top);
337b9c
+
337b9c
 	if (lv_main && lv_is_cow_covering_origin(lv_main)) {
337b9c
 		if (!monitor_dev_for_events(cmd, lv_main, 0, 0))
337b9c
 			stack;
337b9c
-- 
337b9c
2.38.1
337b9c