mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
dmstats: fix new area count for 'create --areasize'
Commit f10ad95 introduced a regression in the calculation of the number of areas in a region created with the --areasize switch: vg_hex-lv_home: Created new region with 0 area(s) as region ID 1 vg_hex-lv_swap: Created new region with 0 area(s) as region ID 1 Fis this by using the correct region size when calculating the value.
This commit is contained in:
parent
0b487802a0
commit
9d5cd4ca14
@ -4456,7 +4456,7 @@ static int _do_stats_create_regions(struct dm_stats *dms,
|
||||
const char *program_id,
|
||||
const char *aux_data)
|
||||
{
|
||||
uint64_t this_start, this_len, region_id = UINT64_C(0);
|
||||
uint64_t this_start = 0, this_len = 0, region_id = UINT64_C(0);
|
||||
char *target_type, *params; /* unused */
|
||||
struct dm_task *dmt;
|
||||
struct dm_info info;
|
||||
@ -4506,7 +4506,7 @@ static int _do_stats_create_regions(struct dm_stats *dms,
|
||||
* whole-device region).
|
||||
*/
|
||||
this_start = (segments) ? segment_start : start;
|
||||
this_len = (segments) ? segment_len : len;
|
||||
this_len = (segments) ? segment_len : this_len;
|
||||
if (!dm_stats_create_region(dms, ®ion_id,
|
||||
this_start, this_len, step,
|
||||
program_id, aux_data)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user