From a82dcadf66dbd43a43d3be40cd62a5074248d218 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 4 Nov 2014 23:21:07 +0100 Subject: [PATCH] snapshot: no snapshot of any cache type LVs Unsupported as of now. --- WHATS_NEW | 1 + lib/metadata/lv_manip.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index 8acbc3d8f..03baa06d5 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.112 - ===================================== + Properly report error when taking snapshot of any cache type LV. Add basic thread debugging messages to dmeventd. Include threads being shutdown in dmeventd device registration responses. Inital support for external users of thin pools based on transaction_id. diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index d3c0c4772..6cf51f97e 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -6804,6 +6804,12 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, return NULL; } + if (lv_is_cache_type(origin_lv)) { + log_error("Snapshots of cache type volume %s " + "is not supported.", display_lvname(origin_lv)); + return NULL; + } + if (lv_is_thin_type(origin_lv) && !lv_is_thin_volume(origin_lv)) { log_error("Snapshots of thin pool %sdevices " "are not supported.",