NeilBrown: Grow: use raid_disks, not nr_disks

Martin F. Krafft madduck at alioth.debian.org
Sat Aug 28 18:47:15 UTC 2010


Module: mdadm
Branch: master
Commit: 925211e323e06cc4a5c2b73d8b0ae0b7fdc9730b
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=925211e323e06cc4a5c2b73d8b0ae0b7fdc9730b

Author: NeilBrown <neilb at suse.de>
Date:   Fri Aug  6 14:40:53 2010 +1000

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 at suse.de>

---

 Grow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Grow.c b/Grow.c
index 37674b8..0571f5b 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));




More information about the pkg-mdadm-commits mailing list