Grow: chose default layout when converting from RAID0.

If we don't do this explicitly, we end up keeping the "current"
layout, which is meaningless for RAID0.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2013-06-24 16:06:21 +10:00
parent 35698c6e91
commit e5ba75ce03
1 changed files with 4 additions and 0 deletions

4
Grow.c
View File

@ -1205,11 +1205,15 @@ char *analyse_change(struct mdinfo *info, struct reshape *re)
delta_parity = 1;
re->level = 5;
re->before.layout = ALGORITHM_PARITY_N;
if (info->new_layout == UnSet)
info->new_layout = map_name(r5layout, "default");
break;
case 6:
delta_parity = 2;
re->level = 6;
re->before.layout = ALGORITHM_PARITY_N;
if (info->new_layout == UnSet)
info->new_layout = map_name(r6layout, "default");
break;
default:
return "Impossible level change requested";