1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-11 20:58:50 +03:00
Bryn M. Reeves 988ca74351 dmstats: improve region creation messages
The region creation message just outputs the new region_id, e.g.:

Created region: 0

This is fine when the device is unambigous (as above) but produces
unhelpful output when creating multiple regions, or regions on
multiple devices:

Created region: 0
Created region: 0
Created region: 1
Created region: 2
Created region: 0

To address this refactor _stats_create_segments() (previously only
used when creating one-region-per-target for --segments) into a
more general _do_stats_create_regions() that can create regions
for each segment, or a single region spanning either the entire
device or a specied start/len range.

This allows us to output all region creation messages from a
single point where both the device name and all information needed
to derive the number of areas is available.

This allows us to log all these facts in the resulting messages:

vg_hex-lv_home: Created new region with 13 area(s) as region ID 0
vg_hex-lv_home: Created new region with 4 area(s) as region ID 1
vg_hex-lv_home: Created new region with 1 area(s) as region ID 2
vg_hex-lv_swap: Created new region with 1 area(s) as region ID 0
vg_hex-lv_root: Created new region with 10 area(s) as region ID 0
luks-79733921-3f68-4c92-9eb7-d0aca4c6ba3e: Created new region with 17 area(s) as region ID 0
vg_hex-lv_images: Created new region with 20 area(s) as region ID 0
vg_hex-lv_images: Created new region with 4 area(s) as region ID 1
2015-08-13 19:05:45 +01:00
..
2015-07-02 15:42:26 -05:00
2015-08-12 14:32:24 +02:00
2015-08-12 14:32:24 +02:00
2015-08-12 19:46:43 +02:00
2008-01-30 14:00:02 +00:00
2015-07-06 17:30:18 +01:00
2008-01-30 14:00:02 +00:00
2015-08-10 00:35:15 +01:00
2015-07-02 15:42:26 -05:00
2015-07-02 15:42:26 -05:00
2015-07-08 14:53:30 +02:00
2015-07-02 15:42:26 -05:00
2015-07-02 15:42:26 -05:00
2015-07-06 15:09:17 +01:00
2014-01-30 13:09:15 +00:00
2015-07-06 17:30:18 +01:00
2015-08-12 14:11:18 +02:00
2015-08-12 14:11:18 +02:00
2015-07-13 14:07:57 -05:00
2015-07-02 15:42:26 -05:00
2015-07-13 14:07:57 -05:00
2015-07-02 15:42:26 -05:00
2015-07-02 15:42:26 -05:00
2015-07-02 15:42:26 -05:00