master - cachevol: wipe 'normal' device
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f6d171ffe33455ab48e142820aa74be901e8aee9 Commit: f6d171ffe33455ab48e142820aa74be901e8aee9 Parent: 615e18f5b2356bd1fd134bc24ea790fa6ec0653f Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Oct 11 15:27:41 2019 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Oct 14 15:14:46 2019 +0200
cachevol: wipe 'normal' device
For wiping we activate and clear 'regular' devices, since in case of whole process interuption (i.e. kill -9) we leave metadata & DM table and workable state all the time.
--- WHATS_NEW | 1 + tools/lvconvert.c | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.03.06 - ================================ + Use normal LVs for wiping of cachevols. Reload cleanered cache DM only with cleaner policy. Fix cmd return when zering of cachevol fails. Extend lvs to show all VDO properties.
tools/lvconvert.c +3 -5
@@ -4224,8 +4224,6 @@ static int _lvconvert_cachevol_attach_single(struct cmd_context *cmd,if (!lockd_lv (cmd, cachevol_lv,"ex" ,LDLV_PERSISTENT )) goto_out; - cachevol_lv->status |=LV_CACHE_VOL ; -if (!wipe_cache_pool (cachevol_lv)) goto_out;
@@ -4240,7 +4238,7 @@ static int _lvconvert_cachevol_attach_single(struct cmd_context *cmd, goto_out;/* Attach the cache to the main LV. */ - + cachevol_lv->status |=LV_CACHE_VOL ;if (!_cache_vol_attach (cmd, lv, cachevol_lv)) goto_out;
@@ -5551,8 +5549,6 @@ static int _lvconvert_writecache_attach_single(struct cmd_context *cmd,if (!archive (vg)) goto_bad; - lv_fast->status |=LV_CACHE_VOL ; -/* * TODO: use libblkid to get the sector size of lv. If it doesn't * match the block_size we are using for the writecache, then warn that
@@ -5567,6 +5563,8 @@ static int _lvconvert_writecache_attach_single(struct cmd_context *cmd,return ECMD_FAILED ; } + lv_fast->status |=LV_CACHE_VOL ; +/* * Changes the vg struct to match the desired state. *