LVM2/lib/metadata metadata.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2012-02-29 00:18:27
Modified files:
lib/metadata : metadata.c
Log message:
Attempt a fix for lvm shell accumulating copies of orphan PVs with each "pvs" invocation.
lib/metadata/metadata.c +4 -1
@@ -2775,7 +2775,8 @@return 1 ; } -/* Make orphan PVs look like a VG */ +/* Make orphan PVs look like a VG. FIXME multiple runs will leak memory +* allocated to PVs into the orphan VG pool which is now global. */ static struct volume_group *_vg_read_orphans (struct cmd_context *cmd,int warnings,const char *orphan_vgname)
@@ -2795,6 +2796,8 @@ return_NULL; vg = fmt->orphan_vg; +dm_list_init (&vg->pvs); + vg->pv_count =0 ; baton.warnings = warnings; baton.vg = vg;