From: Zdenek Kabelac Date: Thu, 5 Jan 2017 14:32:25 +0000 (+0100) Subject: cache: resize is still unsupported X-Git-Tag: v2_02_169~506 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=3e9c03cbbcf102029d11f312e1cd1d20284b6d03;p=lvm2.git 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. --- 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)) {