mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-02 13:47:42 +03:00
80900dcf76
_check_reappeared_pv() incorrectly clears the MISSING_PV flags of PVs with unknown devices. While one caller avoids passing such PVs into the function, the other doesn't. Move the check inside the function so it's not forgotten. Without this patch, if the normal VG reading code tries to repair inconsistent metadata while there is an unknown PV, it incorrectly considers the missing PVs no longer to be missing and produces incorrect 'pvs' output omitting the missing PV, for example. Easy reproducer: Create a VG with 3 PVs pv1, pv2, pv3. Hide pv2. Run vgreduce --removemissing. Reinstate the hidden PV pv2 and at the same time hide a different PV pv3. Run 'pvs' - incorrect output. Run 'pvs' again - correct output. See https://bugzilla.redhat.com/1434054