const struct segment_type *new_segtype,
int yes, int force,
const unsigned stripes,
+ const unsigned new_stripe_size_supplied,
const unsigned new_stripe_size,
const uint32_t new_region_size,
struct dm_list *allocate_pvs);
const struct segment_type *new_segtype,
int yes, int force,
const unsigned new_stripes,
+ const unsigned new_stripe_size_supplied,
const unsigned new_stripe_size,
const uint32_t new_region_size,
struct dm_list *allocate_pvs)
return 0;
}
- stripes = new_stripes ?: _data_rimages_count(seg, seg->area_count);
+ stripes = new_stripes ? : _data_rimages_count(seg, seg->area_count);
+
+ /* FIXME Ensure caller does *not* set wrong default value! */
+ /* Define new stripe size if not passed in */
+ stripe_size = new_stripe_size ? : seg->stripe_size;
if (segtype_is_striped(new_segtype))
new_image_count = stripes;
if (segtype_is_raid(new_segtype) && !_check_max_raid_devices(new_image_count))
return_0;
- /* FIXME Ensure caller does *not* set wrong default value! */
- /* Define new stripe size if not passed in */
- stripe_size = new_stripe_size ?: seg->stripe_size;
-
takeover_fn = _get_takeover_fn(first_seg(lv), new_segtype, new_image_count);
/* Exit without doing activation checks if the combination isn't possible */
sign_t mirrors_sign;
uint32_t stripes;
uint32_t stripe_size;
+ uint32_t stripe_size_supplied;
uint32_t read_ahead;
cache_mode_t cache_mode; /* cache */
const char *policy_name; /* cache */
log_error("RAID module does not support RAID0.");
return 0;
}
- if (!lv_raid_convert(lv, lp->segtype, lp->yes, lp->force, lp->stripes, lp->stripe_size,
+ if (!lv_raid_convert(lv, lp->segtype, lp->yes, lp->force, lp->stripes, lp->stripe_size_supplied, lp->stripe_size,
lp->region_size, lp->pvh))
return_0;
log_print_unless_silent("Logical volume %s successfully converted.",
_striped_type_requested(lp->type_str) || lp->repair || lp->mirrorlog || lp->corelog) {
if (!get_stripe_params(cmd, lp->segtype, &lp->stripes, &lp->stripe_size))
return_0;
+ /* FIXME Move this into the get function */
+ lp->stripe_size_supplied = arg_is_set(cmd, stripesize_ARG);
if (_raid0_type_requested(lp->type_str) || _striped_type_requested(lp->type_str))
/* FIXME Shouldn't need to override get_stripe_params which defaults to 1 stripe (i.e. linear)! */