mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
lvconvert: remove test code
Remove allocate_pvs from raid_manip.c:_region_size_change_request() API and lv_extend() using it added for temporary test purpose. Related: rhbz1366296
This commit is contained in:
parent
28ea66d46d
commit
8296b99a89
@ -4122,8 +4122,7 @@ replaced:
|
|||||||
* Change region size on raid @lv to @region_size if
|
* Change region size on raid @lv to @region_size if
|
||||||
* different from current region_size and adjusted region size
|
* different from current region_size and adjusted region size
|
||||||
*/
|
*/
|
||||||
static int _region_size_change_requested(struct logical_volume *lv, int yes, const uint32_t region_size,
|
static int _region_size_change_requested(struct logical_volume *lv, int yes, const uint32_t region_size)
|
||||||
struct dm_list *allocate_pvs)
|
|
||||||
{
|
{
|
||||||
uint32_t old_region_size;
|
uint32_t old_region_size;
|
||||||
const char *seg_region_size_str;
|
const char *seg_region_size_str;
|
||||||
@ -4185,7 +4184,6 @@ static int _region_size_change_requested(struct logical_volume *lv, int yes, con
|
|||||||
_raid_rmeta_extents(lv->vg->cmd, lv->le_count, seg->region_size, lv->vg->extent_size)) {
|
_raid_rmeta_extents(lv->vg->cmd, lv->le_count, seg->region_size, lv->vg->extent_size)) {
|
||||||
log_error("Region size %s on %s is too small for metadata LV size.",
|
log_error("Region size %s on %s is too small for metadata LV size.",
|
||||||
seg_region_size_str, display_lvname(lv));
|
seg_region_size_str, display_lvname(lv));
|
||||||
if (!lv_extend(lv, seg->segtype, seg->area_count - seg->segtype->parity_devs, seg->stripe_size, 1, seg->region_size, 0, allocate_pvs, lv->vg->alloc, 0))
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4290,7 +4288,7 @@ int lv_raid_convert(struct logical_volume *lv,
|
|||||||
if (new_segtype == seg->segtype &&
|
if (new_segtype == seg->segtype &&
|
||||||
new_region_size != seg->region_size &&
|
new_region_size != seg->region_size &&
|
||||||
seg_is_raid(seg) && !seg_is_any_raid0(seg))
|
seg_is_raid(seg) && !seg_is_any_raid0(seg))
|
||||||
return _region_size_change_requested(lv, yes, new_region_size, allocate_pvs);
|
return _region_size_change_requested(lv, yes, new_region_size);
|
||||||
} else
|
} else
|
||||||
region_size = seg->region_size ? : get_default_region_size(lv->vg->cmd);
|
region_size = seg->region_size ? : get_default_region_size(lv->vg->cmd);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user