]> sourceware.org Git - lvm2.git/commitdiff
partial flag for writecache and integrity
authorDavid Teigland <teigland@redhat.com>
Fri, 11 Dec 2020 21:56:04 +0000 (15:56 -0600)
committerDavid Teigland <teigland@redhat.com>
Fri, 11 Dec 2020 22:25:25 +0000 (16:25 -0600)
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.

lib/metadata/metadata.c
test/shell/writecache-split.sh

index d04b8d8baa56c99f6089b090c582053882803ff2..f4d07a4f7761fcf7419e49edadbfb3ee23a6402b 100644 (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;
index d1b14bfd3b2e40928cf548efb510765af16fb974..5723f7aab654857a421f6086e6ebed42341de415 100644 (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
 
This page took 0.038829 seconds and 5 git commands to generate.