Blame SOURCES/lvm2-2_02_188-lvconvert-no-validation-for-thin-pools-not-used-by-lvm.patch

aaf7d4
From ca84deb23f0cfb51dbeba0ffe44f757345e6f8a0 Mon Sep 17 00:00:00 2001
aaf7d4
From: Zdenek Kabelac <zkabelac@redhat.com>
aaf7d4
Date: Wed, 8 Apr 2020 11:46:42 +0200
aaf7d4
Subject: [PATCH] lvconvert: no validation for thin-pools not used by lvm2
aaf7d4
aaf7d4
lvm2 supports thin-pool to be later used by other tools doing
aaf7d4
virtual volumes themself (i.e. docker) - in this case we
aaf7d4
shall not validate transaction Id - is this is used by
aaf7d4
other tools and lvm2 keeps value 0 - so the transationId
aaf7d4
validation need to be skipped in this case.
aaf7d4
aaf7d4
(cherry picked from commit 1316cafbe988307264e4f87dbcffaf56bc2ab388)
aaf7d4
---
aaf7d4
 tools/lvconvert.c | 3 ++-
aaf7d4
 1 file changed, 2 insertions(+), 1 deletion(-)
aaf7d4
aaf7d4
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
aaf7d4
index d0a6b02..38c8146 100644
aaf7d4
--- a/tools/lvconvert.c
aaf7d4
+++ b/tools/lvconvert.c
aaf7d4
@@ -2330,7 +2330,8 @@ static int _lvconvert_thin_pool_repair(struct cmd_context *cmd,
aaf7d4
 		goto deactivate_mlv;
aaf7d4
 	}
aaf7d4
 
aaf7d4
-	if (thin_dump[0]) {
aaf7d4
+	/* Check matching transactionId when thin-pool is used by lvm2 (transactionId != 0) */
aaf7d4
+	if (first_seg(pool_lv)->transaction_id && thin_dump[0]) {
aaf7d4
 		argv[0] = thin_dump;
aaf7d4
 		argv[1] = pms_path;
aaf7d4
 		argv[2] = NULL;
aaf7d4
-- 
aaf7d4
1.8.3.1
aaf7d4