From 22a1337a9ba1ebf73c3f0b27f621d9d8917bf6cf Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 11 Aug 2015 15:19:00 +0200 Subject: [PATCH] cache: undefined policy is mq If the policy_name is unspecified in metadata, it's automatically 'mq'. --- lib/cache_segtype/cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cache_segtype/cache.c b/lib/cache_segtype/cache.c index d74fbf1a8..93436a31c 100644 --- a/lib/cache_segtype/cache.c +++ b/lib/cache_segtype/cache.c @@ -378,7 +378,9 @@ static int _cache_add_target_line(struct dev_manager *dm, metadata_uuid, data_uuid, origin_uuid, - seg->cleaner_policy ? "cleaner" : cache_pool_seg->policy_name, + seg->cleaner_policy ? "cleaner" : + /* undefined policy name -> likely an old "mq" */ + cache_pool_seg->policy_name ? : "mq", seg->cleaner_policy ? NULL : cache_pool_seg->policy_settings, cache_pool_seg->chunk_size)) return_0;