Fix to prevent seg-faults in LVM when migrating from LVM1 to EVMS2. Apply with: cd /usr/src/evms-2.0.0 patch -p0 < lvm_pv.c.patch --- plugins/lvm/lvm_pv.c 11 Feb 2003 18:10:39 -0000 1.5 +++ plugins/lvm/lvm_pv.c 7 Apr 2003 22:23:02 -0000 1.6 @@ -51,20 +51,17 @@ **/ static u_int64_t lvm_get_pe_start(lvm_physical_volume_t * pv_entry) { - lvm_volume_group_t * group = pv_entry->group; pv_disk_t * pv = pv_entry->pv; u_int64_t first_pe_sector = 0; LOG_ENTRY; if (pv->version == 2) { - LOG_DETAILS("Detected version 2 metadata on PV %d, container %s.\n", - pv->pv_number, group->container->name); + LOG_DETAILS("Detected version 2 metadata on PV %s.\n", + pv_entry->segment->name); LOG_DETAILS("Reverting to version 1.\n"); pv->version = 1; first_pe_sector = pv->pe_start; - group->container->flags |= SCFLAG_DIRTY; - lvm_engine->set_changes_pending(); } if (!first_pe_sector) { @@ -74,13 +71,11 @@ if (pv->pe_start != bytes_to_sectors(pv->pe_on_disk.base + pv->pe_on_disk.size)) { - LOG_DETAILS("Detected pe_start/pe_on_disk.size inconsistency on PV %d, container %s. Fixing.\n", - pv->pv_number, group->container->name); + LOG_DETAILS("Detected pe_start/pe_on_disk.size inconsistency " + "on PV %s. Fixing.\n", pv_entry->segment->name); pv->pe_on_disk.size = sectors_to_bytes(first_pe_sector) - pv->pe_on_disk.base; pv->pe_start = first_pe_sector; - group->container->flags |= SCFLAG_DIRTY; - lvm_engine->set_changes_pending(); } RETURN(first_pe_sector);