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

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