uint32_t lv_raid_image_count(const struct logical_volume *lv);
int lv_raid_change_image_count(struct logical_volume *lv,
uint32_t new_count,
+ uint32_t new_region_size,
struct dm_list *allocate_pvs);
int lv_raid_split(struct logical_volume *lv, const char *split_name,
uint32_t new_count, struct dm_list *splittable_pvs);
display_lvname(lv),
display_lvname(seg_lv(seg, s)));
- log_error("Try removing the PV list and rerun"
+ log_error("Try removing the PV list and rerun."
" the command.");
return 0;
}
- log_debug("LVs with error segments to be removed: %s %s.",
+ log_debug("LVs with error segments to be removed: %s %s",
display_lvname(seg_metalv(seg, s)),
display_lvname(seg_lv(seg, s)));
} else {
}
int lv_raid_change_image_count(struct logical_volume *lv, uint32_t new_count,
- struct dm_list *allocate_pvs)
+ const uint32_t new_region_size, struct dm_list *allocate_pvs)
{
+ struct lv_segment *seg = first_seg(lv);
+
+ if (new_region_size) {
+ seg->region_size = new_region_size;
+ _check_and_adjust_region_size(lv);
+ }
+
return _lv_raid_change_image_count(lv, new_count, allocate_pvs, NULL, 1, 0);
}
DEFAULT_RAID1_MAX_IMAGES, lp->segtype->name, display_lvname(lv));
return 0;
}
- if (!lv_raid_change_image_count(lv, image_count, /* lp->region_size, */ lp->pvh))
+ if (!lv_raid_change_image_count(lv, image_count, lp->region_size, lp->pvh))
return_0;
log_print_unless_silent("Logical volume %s successfully converted.",