From: NeilBrown Date: Fri, 6 Aug 2010 04:40:53 +0000 (+1000) Subject: Grow: use raid_disks, not nr_disks X-Git-Tag: mdadm-3.1.3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=925211e323e06cc4a5c2b73d8b0ae0b7fdc9730b;p=thirdparty%2Fmdadm.git 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 --- diff --git a/Grow.c b/Grow.c index 37674b85..0571f5b0 100644 --- a/Grow.c +++ b/Grow.c @@ -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));