From e5ba75ce0330a599f23325962cb21ea2734e4eaa Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 24 Jun 2013 16:06:21 +1000 Subject: [PATCH] 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 --- Grow.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Grow.c b/Grow.c index 299583c..35584cd 100644 --- a/Grow.c +++ b/Grow.c @@ -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";