LVM2 ./WHATS_NEW lib/metadata/lv_manip.c lib/m ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2010-03-25 02:31:49
Modified files:
. : WHATS_NEW
lib/metadata : lv_manip.c pv_map.h
Log message:
Introduce pv_area_used into allocation algorithm and add debug messages.
This is the next preparatory step towards better --alloc anywhere support and is not intended to break anything that currently works so please report any problems - segfaults, bogus data in the new debug messages, or if the code now chooses bizarre allocation layouts.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1477&r2=1.1478
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.212&r2=1.213
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/pv_map.h.diff?cvsroot=lvm2&r1=1.10&r2=1.11
WHATS_NEW +3 -2
@@ -1,7 +1,8 @@ Version 2.02.63 - ================================ - Add "monitoring" option to "activation" section of lvm.conf. - Add --monitor and --ignoremonitoring support to lvcreate. + Introduce pv_area_used into allocation algorithm and add debug messages. + Add activation/monitoring to lvm.conf. + Add --monitor and --ignoremonitoring to lvcreate. Allow dynamic extension of array of areas selected as allocation candidates. Export and use only valid cookie value in test suite. Remove const modifier for struct volume_group* from process_each_lv_in_vg().
lib/metadata/lv_manip.c +61 -22
215 lines not on this page · raw message
lib/metadata/pv_map.h +13 -0
@@ -34,6 +34,18 @@struct dm_list list;/* pv_map.areas */ }; +/* +* When building up a potential group of "parallel" extent ranges during +* an allocation attempt, track the maximum number of extents that may +* need to be used as a particular parallel area. Several of these +* structs may reference the same pv_area, but 'used' may differ between +* them. +*/ +struct pv_area_used { +struct pv_area *pva; +uint32_t used; +}; +struct pv_map {struct physical_volume *pv;struct dm_list areas;/* struct pv_areas */
@@ -49,6 +61,7 @@ struct dm_list *allocatable_pvs);void consume_pv_area (struct pv_area *area,uint32_t to_go); +void reinsert_reduced_pv_area (struct pv_area *pva);uint32_t pv_maps_size (struct dm_list *pvms);