]> sourceware.org Git - lvm2.git/commit
raid: fix (de)activation of RaidLVs with visible SubLVs
authorHeinz Mauelshagen <heinzm@redhat.com>
Wed, 31 Oct 2018 22:05:08 +0000 (23:05 +0100)
committerHeinz Mauelshagen <heinzm@redhat.com>
Tue, 11 Dec 2018 15:35:34 +0000 (16:35 +0100)
commitdd5716ddf258c4a44819fa90d3356833ccf767b4
treee30f68547a530edf37523866b2ba7a9588abf7fa
parentb2d1facd960e192b38ae4a9866f3bea9646e6cd5
raid: fix (de)activation of RaidLVs with visible SubLVs

There's a small window during creation of a new RaidLV when
rmeta SubLVs are made visible to wipe them in order to prevent
erroneous discovery of stale RAID metadata.  In case a crash
prevents the SubLVs from being committed hidden after such
wiping, the RaidLV can still be activated with the SubLVs visible.
During deactivation though, a deadlock occurs because the visible
SubLVs are deactivated before the RaidLV.

The patch adds _check_raid_sublvs to the raid validation in merge.c,
an activation check to activate.c (paranoid, because the merge.c check
will prevent activation in case of visible SubLVs) and shares the
existing wiping function _clear_lvs in raid_manip.c moved to lv_manip.c
and renamed to activate_and_wipe_lvlist to remove code duplication.
Whilst on it, introduce activate_and_wipe_lv to share with
(lvconvert|lvchange).c.

Resolves: rhbz1633167
WHATS_NEW
lib/activate/activate.c
lib/metadata/lv_manip.c
lib/metadata/merge.c
lib/metadata/metadata-exported.h
lib/metadata/raid_manip.c
tools/lvchange.c
tools/lvconvert.c
This page took 0.04041 seconds and 5 git commands to generate.