Grow: use raid_disks, not nr_disks

nr_disks is just wrong here - the arrays need room for all disk slots,
even if some are empty, plus spares, plus a possible backup file.
So raid_disks is correct.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2010-08-06 14:40:53 +10:00
parent 7204495377
commit 925211e323
1 changed files with 1 additions and 1 deletions

2
Grow.c
View File

@ -979,7 +979,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
rv = 1;
break;
}
nrdisks = array.nr_disks + sra->array.spare_disks;
nrdisks = array.raid_disks + sra->array.spare_disks;
/* Now we need to open all these devices so we can read/write.
*/
fdlist = malloc((1+nrdisks) * sizeof(int));