1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdm: rename 'region' to 'skip_region' in _stats_walk_next

In libdm-stats.c 'region' usually refers to a 'struct region*'.
Rename the argument to _stats_walk_start to avoid confusion.
This commit is contained in:
Bryn M. Reeves 2016-06-20 17:12:38 +01:00
parent 82e5766062
commit 4cd3dcbbc2

View File

@ -1003,7 +1003,7 @@ bad:
return 0; return 0;
} }
static void _stats_walk_next(const struct dm_stats *dms, int region, static void _stats_walk_next(const struct dm_stats *dms, int skip_region,
uint64_t *cur_r, uint64_t *cur_a) uint64_t *cur_r, uint64_t *cur_a)
{ {
struct dm_stats_region *cur; struct dm_stats_region *cur;
@ -1015,17 +1015,16 @@ static void _stats_walk_next(const struct dm_stats *dms, int region,
cur = dms->regions + *cur_r; cur = dms->regions + *cur_r;
present = _stats_region_present(cur); present = _stats_region_present(cur);
if (region && present) if (skip_region && present)
*cur_a = _nr_areas_region(cur); *cur_a = _nr_areas_region(cur);
if (region || !present || ++(*cur_a) == _nr_areas_region(cur)) { if (skip_region || !present || ++(*cur_a) == _nr_areas_region(cur)) {
*cur_a = 0; *cur_a = 0;
while(!dm_stats_region_present(dms, ++(*cur_r)) while(!dm_stats_region_present(dms, ++(*cur_r))
&& *cur_r < dms->max_region) && *cur_r < dms->max_region)
; /* keep walking until a present region is found ; /* keep walking until a present region is found
* or the end of the table is reached. */ * or the end of the table is reached. */
} }
} }
static void _stats_walk_start(const struct dm_stats *dms, static void _stats_walk_start(const struct dm_stats *dms,