summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2023-02-08 13:34:35 -0600
committerDavid Teigland <teigland@redhat.com>2023-02-08 14:02:41 -0600
commit1fe846dd0900d6a5193a0c238e0b96036bd12d25 (patch)
tree9087081806bea6079ef9e07358020b85a4f5c9e8
parent24fefd2e44d0696aff97b54a6053a709be3ad663 (diff)
downloadlvm2-1fe846dd0900d6a5193a0c238e0b96036bd12d25.tar.gz
vg_read: keep MISSING_PV when device with no mda reappears
Remove old code that became incorrect at some point. It's probably a fragment of an old condition that was left behind because it wasn't understood. We don't want to drop the MISSING_PV flag just because the PV has no mda in use. The device that was missing may have stale data, so the user needs to decide if the device should be removed or restored.
-rw-r--r--lib/metadata/metadata.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 91a23f931..10af75665 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -3571,12 +3571,6 @@ static void _set_pv_device(struct format_instance *fid,
if (!pv->dev)
pv->status |= MISSING_PV;
- /* is this correct? */
- if ((pv->status & MISSING_PV) && pv->dev && (pv_mda_used_count(pv) == 0)) {
- pv->status &= ~MISSING_PV;
- log_info("Found a previously MISSING PV %s with no MDAs.", pv_dev_name(pv));
- }
-
/* Fix up pv size if missing or impossibly large */
if ((!pv->size || pv->size > (1ULL << 62)) && pv->dev) {
if (!dev_get_size(pv->dev, &pv->size)) {