1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-21 15:33:18 +03:00

Fix all segments memory is allocated from vg private mempool.

Physical segments were still allocated from global
command context mempool.

This leads to very high memory usage when
activating large VG (vgchange).
(Memory usage was about 2G when >3000LVs).

Fix it by properly using vg->vgmem private pool,
so all the memory is released early.

New memory pool parameter is needed here for pv_split_segment
function.

Also fix the same problem in some minor allocations
(vg description, lv segment split).
This commit is contained in:
Milan Broz
2010-03-31 17:23:18 +00:00
parent 0423887528
commit 6733116a19
6 changed files with 19 additions and 14 deletions

View File

@@ -114,7 +114,7 @@ struct volume_group *text_vg_import_fd(struct format_instance *fid,
if (!(vg = (*vsn)->read_vg(fid, cft, 0)))
goto_out;
(*vsn)->read_desc(fid->fmt->cmd->mem, cft, when, desc);
(*vsn)->read_desc(vg->vgmem, cft, when, desc);
break;
}