raid: stripes option is not allowed with RAID1
PATCH 1/1 raid: stripes option is not allowed with RAID1
--- tools/lvconvert.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/lvconvert.c +3 -2
@@ -209,10 +209,11 @@ static int _read_params(struct cmd_context *cmd, struct lvconvert_params *lp) lp->type_str =SEG_TYPE_NAME_STRIPED ;if ((arg_is_set (cmd, stripes_long_ARG) ||arg_is_set (cmd, stripesize_ARG)) && - !(_mirror_or_raid_type_requested (cmd, lp->type_str) ||_striped_type_requested (lp->type_str) || + !(_mirror_or_raid_type_requested (cmd, lp->type_str) &&strcmp (lp->type_str,SEG_TYPE_NAME_RAID1 ) || +_striped_type_requested (lp->type_str) ||_raid0_type_requested (lp->type_str) ||arg_is_set (cmd, thinpool_ARG))) {log_error ("--stripes or --stripesize argument is only valid " -"with --mirrors/--type mirror/--type raid*/--type striped/--type linear, --repair and --thinpool" ); +"with --mirrors/--type mirror/--type raid{4,5,6,10}/--type striped/--type linear, --repair and --thinpool" );return 0 ; }
Signature · 1 line
1.8.3.1
PATCH 1/1 raid: stripes option is not allowed with RAID1
Quoted 13 lines · Marian Csontos
--- tools/lvconvert.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tools/lvconvert.c +0
-0@@ -209,10 +209,11 @@ static int _read_params(struct cmd_context *cmd, struct lvconvert_params *lp) lp->type_str =SEG_TYPE_NAME_STRIPED ; if ((arg_is_set(cmd, stripes_long_ARG) || arg_is_set(cmd, stripesize_ARG)) &&
tools/lvconvert.c static int _read_params(struct cmd_context *cmd, struct lvconvert_params *lp) · line 219
Quoted 10 lines
tools/lvconvert.c +3
-2- !(_mirror_or_raid_type_requested(cmd, lp->type_str) || _striped_type_requested(lp->type_str) || + !(_mirror_or_raid_type_requested(cmd, lp->type_str) && strcmp(lp->type_str, SEG_TYPE_NAME_RAID1) || + _striped_type_requested(lp->type_str) || _raid0_type_requested(lp->type_str) || arg_is_set(cmd, thinpool_ARG))) {log_error ("--stripes or --stripesize argument is only valid " -"with --mirrors/--type mirror/--type raid*/--type striped/--type linear, --repair and --thinpool" ); +"with --mirrors/--type mirror/--type raid{4,5,6,10}/--type striped/--type linear, --repair and --thinpool" );return 0 ; }
NAK. I thought this should be as easy as this. Turns out it is not. Test is failing.