1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cache: cleaner policy also uses fmt2

Format 2 is also with cleaner policy.
This commit is contained in:
Zdenek Kabelac 2018-06-08 12:37:07 +02:00
parent 39fc98d731
commit 39e3b5d8ac
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.180 -
=================================
Cache can uses metadata format 2 with cleaner policy.
Avoid showing internal error in lvs output or pvmoved LVs.
Fix check if resized PV can also fit metadata area.
Reopen devices RDWR before writing to avoid udev issues.

View File

@ -843,12 +843,13 @@ 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 policy is allowed to select format 2.
* 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")) {
} else if (strcmp(seg->policy_name, "smq") &&
strcmp(seg->policy_name, "cleaner")) {
seg->cache_metadata_format = CACHE_METADATA_FORMAT_1;
return 1;
}