From 95e3dd5fb1297f6b1aa23cbedad1ab3dc14343a7 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 22 Dec 2016 21:15:31 +0100 Subject: [PATCH] lv: more exact check for merging origin Merging origin has 'MERGE_LV' and should also have its merging snapshot. --- WHATS_NEW | 1 + lib/metadata/metadata-exported.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 6ab385dec..8fefe6ade 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.169 - ===================================== + Checking LV for merging origin requires also it has merged snapshot. Extend validation of metadata processing. Enable usage of cached volumes as snapshot origin LV. Fix displayed lv name when splitting snapshot (2.02.146). diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h index aa40c6c1e..4e0588538 100644 --- a/lib/metadata/metadata-exported.h +++ b/lib/metadata/metadata-exported.h @@ -198,7 +198,7 @@ #define lv_is_partial(lv) (((lv)->status & PARTIAL_LV) ? 1 : 0) #define lv_is_virtual(lv) (((lv)->status & VIRTUAL) ? 1 : 0) #define lv_is_merging(lv) (((lv)->status & MERGING) ? 1 : 0) -#define lv_is_merging_origin(lv) (lv_is_merging(lv)) +#define lv_is_merging_origin(lv) (lv_is_merging(lv) && (lv)->snapshot) #define lv_is_snapshot(lv) (((lv)->status & SNAPSHOT) ? 1 : 0) #define lv_is_converting(lv) (((lv)->status & CONVERTING) ? 1 : 0) #define lv_is_external_origin(lv) (((lv)->external_count > 0) ? 1 : 0) -- 2.43.5