mrc0mmand / rpms / lvm2

Forked from rpms/lvm2 2 years ago
Clone

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

18db87
 tools/lvconvert.c | 3 ++-
18db87
 1 file changed, 2 insertions(+), 1 deletion(-)
18db87
18db87
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
18db87
index f6d9a29..bb40930 100644
18db87
--- a/tools/lvconvert.c
18db87
+++ b/tools/lvconvert.c
18db87
@@ -2388,7 +2388,8 @@ static int _lvconvert_thin_pool_repair(struct cmd_context *cmd,
18db87
 		goto deactivate_mlv;
18db87
 	}
18db87
 
18db87
-	if (thin_dump[0]) {
18db87
+	/* Check matching transactionId when thin-pool is used by lvm2 (transactionId != 0) */
18db87
+	if (first_seg(pool_lv)->transaction_id && thin_dump[0]) {
18db87
 		argv[0] = thin_dump;
18db87
 		argv[1] = pms_path;
18db87
 		argv[2] = NULL;