mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
cache: lvconvert accepts --cachemode for --cache
All cache args could be specified when caching LV (means converting LV to cached). When --cachemode arg is given during cache-pool conversion, store it in the metadata. https://bugzilla.redhat.com/show_bug.cgi?id=1255184
This commit is contained in:
parent
a4fdfc098d
commit
9886fd236e
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.129 -
|
Version 2.02.129 -
|
||||||
===================================
|
===================================
|
||||||
|
Accept --cachemode with lvconvert.
|
||||||
Fix and improve reporting properties of cache-pool.
|
Fix and improve reporting properties of cache-pool.
|
||||||
Enable usage of --cachepolicy and --cachesetting with lvconvert.
|
Enable usage of --cachepolicy and --cachesetting with lvconvert.
|
||||||
Don't allow to reduce size of thin-pool metadata.
|
Don't allow to reduce size of thin-pool metadata.
|
||||||
|
@ -2828,7 +2828,7 @@ static int _lvconvert_pool(struct cmd_context *cmd,
|
|||||||
|
|
||||||
if (!metadata_lv) {
|
if (!metadata_lv) {
|
||||||
if (arg_from_list_is_set(cmd, "is invalid with existing pool",
|
if (arg_from_list_is_set(cmd, "is invalid with existing pool",
|
||||||
cachemode_ARG, chunksize_ARG, discards_ARG,
|
chunksize_ARG, discards_ARG,
|
||||||
zero_ARG, poolmetadatasize_ARG, -1))
|
zero_ARG, poolmetadatasize_ARG, -1))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
@ -3069,6 +3069,10 @@ mda_write:
|
|||||||
seg->discards = lp->discards;
|
seg->discards = lp->discards;
|
||||||
seg->zero_new_blocks = lp->zero ? 1 : 0;
|
seg->zero_new_blocks = lp->zero ? 1 : 0;
|
||||||
|
|
||||||
|
if (lp->cache_mode &&
|
||||||
|
!cache_set_mode(seg, lp->cache_mode))
|
||||||
|
return_0;
|
||||||
|
|
||||||
if ((lp->policy_name || lp->policy_settings) &&
|
if ((lp->policy_name || lp->policy_settings) &&
|
||||||
!cache_set_policy(seg, lp->policy_name, lp->policy_settings))
|
!cache_set_policy(seg, lp->policy_name, lp->policy_settings))
|
||||||
return_0;
|
return_0;
|
||||||
|
Loading…
Reference in New Issue
Block a user