1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +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 1f5f8382ae
commit 5cb4b2a424
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 3.0.0 Version 3.0.0
============= =============
Cache can uses metadata format 2 with cleaner policy.
Fix check if resized PV can also fit metadata area. Fix check if resized PV can also fit metadata area.
Avoid showing internal error in lvs output or pvmoved LVs. Avoid showing internal error in lvs output or pvmoved LVs.
Remove clvmd Remove clvmd

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. * 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 (!seg->policy_name) {
if (format == CACHE_METADATA_FORMAT_2) if (format == CACHE_METADATA_FORMAT_2)
seg->policy_name = "smq"; 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; seg->cache_metadata_format = CACHE_METADATA_FORMAT_1;
return 1; return 1;
} }