1. Mistake in target level comparison. 2. Initialize reshape->after.data_disks field to proper spares_needed calculation --- Grow.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Grow.c b/Grow.c index a8da20a..e1e509e 100644 --- a/Grow.c +++ b/Grow.c @@ -941,11 +941,12 @@ char *analyse_change(struct mdinfo *info, struct reshape *re) return NULL; } if (info->array.raid_disks == 2 && - info->array.raid_disks == 5) { + info->new_level == 5) { /* simple in-place conversion */ re->level = 5; re->parity = 1; re->before.data_disks = 1; + re->after.data_disks = 1; re->before.layout = ALGORITHM_LEFT_SYMMETRIC; re->backup_blocks = 0; return NULL; -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html