mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-30 05:49:28 +03:00
Finalize PV format instances properly in lvm_vg_write fn.
lvm_vg_write fn reinitializes the vg->removed_pvs list. We have to finalize all PV format instances attached to PVs found in the original list.
This commit is contained in:
@ -147,6 +147,7 @@ int lvm_vg_write(vg_t vg)
|
|||||||
if (! dm_list_empty(&vg->removed_pvs)) {
|
if (! dm_list_empty(&vg->removed_pvs)) {
|
||||||
dm_list_iterate_items(pvl, &vg->removed_pvs) {
|
dm_list_iterate_items(pvl, &vg->removed_pvs) {
|
||||||
pv_write_orphan(vg->cmd, pvl->pv);
|
pv_write_orphan(vg->cmd, pvl->pv);
|
||||||
|
pv_set_fid(pvl->pv, NULL);
|
||||||
/* FIXME: do pvremove / label_remove()? */
|
/* FIXME: do pvremove / label_remove()? */
|
||||||
}
|
}
|
||||||
dm_list_init(&vg->removed_pvs);
|
dm_list_init(&vg->removed_pvs);
|
||||||
|
Reference in New Issue
Block a user