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

partial flag for writecache and integrity

When a writecache sublv or an integrity metadata sublv
are partial (missing a dev), set the partial flag on
the upper level LV also, as is done for other sublvs.
This commit is contained in:
David Teigland 2020-12-11 15:56:04 -06:00
parent 23ef677762
commit b84a9927b7
2 changed files with 14 additions and 0 deletions

View File

@ -1916,6 +1916,10 @@ static int _lv_each_dependency(struct logical_volume *lv,
return_0;
if (lvseg->metadata_lv && !fn(lvseg->metadata_lv, data))
return_0;
if (lvseg->writecache && !fn(lvseg->writecache, data))
return_0;
if (lvseg->integrity_meta_dev && !fn(lvseg->integrity_meta_dev, data))
return_0;
for (s = 0; s < lvseg->area_count; ++s) {
if (seg_type(lvseg, s) == AREA_LV && !fn(seg_lv(lvseg,s), data))
return_0;

View File

@ -99,6 +99,11 @@ lvchange -an $vg/$lv1
aux disable_dev "$dev2"
lvs -a -o+lv_health_status $vg |tee out
grep $lv1 out | grep partial
grep $lv2 out | grep partial
check lv_attr_bit health $vg/$lv1 "p"
not lvconvert --splitcache $vg/$lv1
lvconvert --splitcache --force --yes $vg/$lv1
@ -128,6 +133,11 @@ lvchange -an $vg/$lv1
aux disable_dev "$dev3"
lvs -a -o+lv_health_status $vg |tee out
grep $lv1 out | grep partial
grep $lv2 out | grep partial
check lv_attr_bit health $vg/$lv1 "p"
not lvconvert --splitcache $vg/$lv1
lvconvert --splitcache --force --yes $vg/$lv1