From 3e9c03cbbcf102029d11f312e1cd1d20284b6d03 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 5 Jan 2017 15:32:25 +0100 Subject: [PATCH] cache: resize is still unsupported During rework of resize code this validation check has been lost (in my resize branch). Upstream is still not supporting resize of any cache type LV so needs to be prevented. --- WHATS_NEW | 1 + lib/metadata/lv_manip.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index 5fb590468..3fde645ab 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.169 - ===================================== + Restore check preventing resize of cache type volumes (2.02.158). Add missing udev sync when flushing dirty cache content. vgchange -p accepts only uint32 numbers. Report thin LV date for merged LV when the merge is in progress. diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 9759cda1d..a954bf7d2 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -4687,6 +4687,11 @@ static int _lvresize_check(struct logical_volume *lv, return 0; } + if (lv_is_cache_type(lv)) { + log_error("Unable to resize logical volumes of cache type."); + return 0; + } + if (!lv_is_visible(lv) && !lv_is_thin_pool_metadata(lv) && !lv_is_lockd_sanlock_lv(lv)) { -- 2.43.5