From 0285066e10d0c4a37bc4938eeed2139299600b3e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 24 Nov 2015 23:24:11 +0100 Subject: [PATCH] thin: fix previous update of partial tree building We do want to preserve 'active' thin-pool, so add this 'fake' layer only when activating. TODO: think how to use thin-pool without fake LV layer. --- lib/activate/dev_manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index da24cdd85..eb47ed147 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -2311,7 +2311,8 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, return_0; if (seg->pool_lv && (lv_is_cache_pool(seg->pool_lv) || !dm->skip_external_lv) && - !_add_lv_to_dtree(dm, dtree, seg->pool_lv, origin_only)) + /* When activating and not origin_only detect linear 'overlay' over pool */ + !_add_lv_to_dtree(dm, dtree, seg->pool_lv, dm->activation ? origin_only : 1)) return_0; for (s = 0; s < seg->area_count; s++) {