mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-21 02:50:41 +03:00
Attempt a fix for lvm shell accumulating copies of orphan PVs with each "pvs"
invocation.
This commit is contained in:
parent
193d697ba4
commit
ce80d6e401
@ -2775,7 +2775,8 @@ static int _vg_read_orphan_pv(struct lvmcache_info *info, void *baton)
|
||||
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 @@ static struct volume_group *_vg_read_orphans(struct cmd_context *cmd,
|
||||
return_NULL;
|
||||
|
||||
vg = fmt->orphan_vg;
|
||||
dm_list_init(&vg->pvs);
|
||||
vg->pv_count = 0;
|
||||
|
||||
baton.warnings = warnings;
|
||||
baton.vg = vg;
|
||||
|
Loading…
x
Reference in New Issue
Block a user