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

cleanup: fix warning about shadowed declaration

Avoid shadowing lv_size as lv_size() is already defined function in lv.h
This commit is contained in:
Zdenek Kabelac 2017-02-12 17:47:35 +01:00
parent 717d0c6b94
commit a39c828c01
3 changed files with 6 additions and 5 deletions

View File

@ -4089,6 +4089,7 @@ int lv_extend(struct logical_volume *lv,
uint32_t sub_lv_count;
uint32_t old_extents;
uint32_t new_extents; /* Total logical size after extension. */
uint64_t raid_size;
log_very_verbose("Adding segment of type %s to LV %s.", segtype->name, lv->name);
@ -4111,7 +4112,7 @@ int lv_extend(struct logical_volume *lv,
/* FIXME log_count should be 1 for mirrors */
if (segtype_is_raid(segtype) && !segtype_is_any_raid0(segtype)) {
uint64_t lv_size = ((uint64_t) lv->le_count + extents) * lv->vg->extent_size;
raid_size = ((uint64_t) lv->le_count + extents) * lv->vg->extent_size;
/*
* The MD bitmap is limited to being able to track 2^21 regions.
@ -4119,7 +4120,7 @@ int lv_extend(struct logical_volume *lv,
* unless raid0/raid0_meta, which doesn't have a bitmap.
*/
region_size = raid_ensure_min_region_size(lv, lv_size, region_size);
region_size = raid_ensure_min_region_size(lv, raid_size, region_size);
if (first_seg(lv))
first_seg(lv)->region_size = region_size;

View File

@ -1222,7 +1222,7 @@ uint32_t raid_rmeta_extents_delta(struct cmd_context *cmd,
uint32_t region_size, uint32_t extent_size);
uint32_t raid_rimage_extents(const struct segment_type *segtype,
uint32_t extents, uint32_t stripes, uint32_t data_copies);
uint32_t raid_ensure_min_region_size(const struct logical_volume *lv, uint64_t lv_size, uint32_t region_size);
uint32_t raid_ensure_min_region_size(const struct logical_volume *lv, uint64_t raid_size, uint32_t region_size);
/* -- metadata/raid_manip.c */
/* ++ metadata/cache_manip.c */

View File

@ -55,9 +55,9 @@ static int _check_num_areas_in_lv_segments(struct logical_volume *lv, unsigned n
*
* Pass in @lv_size, because funcion can be called with an empty @lv.
*/
uint32_t raid_ensure_min_region_size(const struct logical_volume *lv, uint64_t lv_size, uint32_t region_size)
uint32_t raid_ensure_min_region_size(const struct logical_volume *lv, uint64_t raid_size, uint32_t region_size)
{
uint32_t min_region_size = lv_size / (1 << 21);
uint32_t min_region_size = raid_size / (1 << 21);
uint32_t region_size_sav = region_size;
while (region_size < min_region_size)