master - metadata: move vg parsing to vg_write
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8c878438f5a75310d09a1ee035d9caf8e2b9e50b Commit: 8c878438f5a75310d09a1ee035d9caf8e2b9e50b Parent: 203affffc70622e1b0db4734bc631cd7caf22442 Author: Zdenek Kabelac <[email protected]> AuthorDate: Sat Feb 22 01:44:21 2014 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Feb 24 21:08:53 2014 +0100
metadata: move vg parsing to vg_write
Parsing vg structure during supend/commit/resume may require a lot of memory - so move this into vg_write.
FIXME: there are now multiple cache layers which our doing some thing multiple times at different levels. Moreover there is now different caching path with and without lvmetad - this should be unified and both path should use same mechanism.
--- WHATS_NEW | 1 + lib/metadata/metadata.c | 52 ++++++++++++++++++++++++++++++++-------------- lib/metadata/vg.c | 1 + lib/metadata/vg.h | 1 + 4 files changed, 39 insertions(+), 16 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.106 - ==================================== + Move parsing of VG metadata from vg_commit() back to vg_write() (2.02.99) Avoid a PV label scan while in a critical section. Remove (always 0) skip argument from lv_activation_skip(). Create /dev/disk/by-id/lvm-pv-uuid-<PV_UUID> symlink for each PV via udev.
lib/metadata/metadata.c +36 -16
87 lines not on this page · raw message
lib/metadata/vg.c +1 -0
@@ -89,6 +89,7 @@ void release_vg(struct volume_group *vg)return ;release_vg (vg->vg_ondisk); +release_vg (vg->vg_precommitted);_free_vg (vg); }
lib/metadata/vg.h +1 -0
@@ -57,6 +57,7 @@ struct volume_group {* _vg_update_vg_ondisk. */ struct volume_group *vg_ondisk; +struct volume_group *vg_precommitted;/* Parsed from precommitted */ alloc_policy_t alloc;struct profile *profile;