diff options
author | Alasdair Kergon <agk@redhat.com> | 2010-03-25 02:31:48 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2010-03-25 02:31:48 +0000 |
commit | 8d6722c8adf8c704fab4abde13365d5c6d56191a (patch) | |
tree | 8133c9008175921e440bde4d27c16c2901158b96 /lib/metadata/pv_map.h | |
parent | 4c42d18e0c322795e5ea49c8f940d9df5b1ed59a (diff) | |
download | lvm2-8d6722c8adf8c704fab4abde13365d5c6d56191a.tar.gz lvm2-8d6722c8adf8c704fab4abde13365d5c6d56191a.tar.xz lvm2-8d6722c8adf8c704fab4abde13365d5c6d56191a.zip |
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.
Diffstat (limited to 'lib/metadata/pv_map.h')
-rw-r--r-- | lib/metadata/pv_map.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/metadata/pv_map.h b/lib/metadata/pv_map.h index b71d3762..6d6cfff2 100644 --- a/lib/metadata/pv_map.h +++ b/lib/metadata/pv_map.h @@ -34,6 +34,18 @@ struct pv_area { 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 *create_pv_maps(struct dm_pool *mem, struct volume_group *vg, 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); |