if ((features & RBD_FEATURE_STRIPINGV2) == 0 &&
((stripe_unit && stripe_unit != (1ull << order)) ||
(stripe_count && stripe_count != 1))) {
- lderr(cct) << "STRIPINGV2 and format 2 or later required for non-default striping" << dendl;
- return -EINVAL;
+ features |= RBD_FEATURE_STRIPINGV2;
}
if ((stripe_unit && !stripe_count) ||
c_opts.set(RBD_IMAGE_OPTION_ORDER, order);
}
- if (c_opts.get(RBD_IMAGE_OPTION_STRIPE_UNIT, &stripe_unit) == 0 ||
- c_opts.get(RBD_IMAGE_OPTION_STRIPE_COUNT, &stripe_count) == 0) {
- features |= RBD_FEATURE_STRIPINGV2;
- }
-
c_opts.set(RBD_IMAGE_OPTION_FEATURES, features);
r = create(c_ioctx, c_name, size, c_opts, non_primary_global_image_id,
primary_mirror_uuid);
uint64_t stripe_unit = src->stripe_unit;
if (opts.get(RBD_IMAGE_OPTION_STRIPE_UNIT, &stripe_unit) != 0) {
opts.set(RBD_IMAGE_OPTION_STRIPE_UNIT, stripe_unit);
- } else {
- features |= RBD_FEATURE_STRIPINGV2;
}
uint64_t stripe_count = src->stripe_count;
if (opts.get(RBD_IMAGE_OPTION_STRIPE_COUNT, &stripe_count) != 0) {
opts.set(RBD_IMAGE_OPTION_STRIPE_COUNT, stripe_count);
- } else {
- features |= RBD_FEATURE_STRIPINGV2;
}
uint64_t order = src->order;
if (opts.get(RBD_IMAGE_OPTION_ORDER, &order) != 0) {