From 2c67b829a53d386f995ec7d98699e179317e2d23 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Fri, 1 Apr 2011 13:44:51 +0000 Subject: [PATCH] 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. --- liblvm/lvm_vg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/liblvm/lvm_vg.c b/liblvm/lvm_vg.c index dfc0c5ee2..08b421286 100644 --- a/liblvm/lvm_vg.c +++ b/liblvm/lvm_vg.c @@ -147,6 +147,7 @@ int lvm_vg_write(vg_t vg) if (! dm_list_empty(&vg->removed_pvs)) { dm_list_iterate_items(pvl, &vg->removed_pvs) { pv_write_orphan(vg->cmd, pvl->pv); + pv_set_fid(pvl->pv, NULL); /* FIXME: do pvremove / label_remove()? */ } dm_list_init(&vg->removed_pvs); -- 2.43.5