]> sourceware.org Git - lvm2.git/commitdiff
cache: drop metadata_format validation
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 7 Aug 2018 08:33:19 +0000 (10:33 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 7 Aug 2018 16:04:14 +0000 (18:04 +0200)
Allow to use any combination of cache metadata format for policy.

WHATS_NEW
lib/metadata/cache_manip.c

index 5e8b00de37b20a524066bc6fbbe9c5375d94f7ea..e31aca232c3f35eb181d32c345faa021bce81f4e 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.182 - 
 ==============================
+  Do not pair cache policy and cache metadata format.
 
 Version 2.02.181 - 01 August 2018
 =================================
index c15f1176acda44c6e58cd8915cab833681455b53..8376bfbf0c37b4185708ff7eae89ef9768603c6e 100644 (file)
@@ -843,15 +843,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 */
This page took 0.050684 seconds and 5 git commands to generate.