When metadata raid_disks information is correct for reshape working level, this information has to be used for spares_needed calculation. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Grow.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Grow.c b/Grow.c index a05bcef..68962bf 100644 --- a/Grow.c +++ b/Grow.c @@ -1661,7 +1661,7 @@ static int reshape_array(char *container, int fd, char *devname, sysfs_freeze_array(info); spares_needed = max(reshape.before.data_disks, reshape.after.data_disks) - + reshape.parity - array.raid_disks; + + reshape.parity - info->array.raid_disks; if (!force && info->new_level > 1 && -- 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