FIX: Check correctly raid disks during reshape restart

During reshape restart info->array.raid_disks contains new raid_disks number
It cannot be compared against old disks number. Such check will always fail.

Check raid disks array field against final disks number for restart.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Adam Kwolek 2011-04-19 17:25:43 +10:00 committed by NeilBrown
parent 7af0334155
commit 384e9be133
1 changed files with 2 additions and 1 deletions

3
Grow.c
View File

@ -1692,7 +1692,8 @@ static int reshape_array(char *container, int fd, char *devname,
if (restart &&
(reshape.level != info->array.level ||
reshape.before.layout != info->array.layout ||
reshape.before.data_disks + reshape.parity != info->array.raid_disks)) {
reshape.before.data_disks + reshape.parity
!= info->array.raid_disks - info->delta_disks)) {
fprintf(stderr, Name ": reshape info is not in native format -"
" cannot continue.\n");
goto release;