From c34291e3bf61cc2644389cbce77e9953f67a843a Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 7 Aug 2018 10:33:19 +0200 Subject: [PATCH] cache: drop metadata_format validation Allow to use any combination of cache metadata format for policy. --- WHATS_NEW | 1 + lib/metadata/cache_manip.c | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 2c5b5d313..2cf796965 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 3.0.0 ============= + Do not pair cache policy and cache metadata format. lvconvert: reject conversions on raid1 LVs with split tracked SubLVs lvconvert: reject conversions on raid1 split tracked SubLVs Add basic creation support for VDO target. diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c index 4132e2faa..5ba353ced 100644 --- a/lib/metadata/cache_manip.c +++ b/lib/metadata/cache_manip.c @@ -842,15 +842,10 @@ int cache_set_metadata_format(struct lv_segment *seg, cache_metadata_format_t fo /* * If policy is unselected, but format 2 is selected, policy smq is enforced. - * ATM no other then smq & cleaner policy is allowed to select format 2. */ if (!seg->policy_name) { if (format == CACHE_METADATA_FORMAT_2) seg->policy_name = "smq"; - } else if (strcmp(seg->policy_name, "smq") && - strcmp(seg->policy_name, "cleaner")) { - seg->cache_metadata_format = CACHE_METADATA_FORMAT_1; - return 1; } /* Check if we need to search for configured cache metadata format */ -- 2.43.5