From 08110d41bc376e0a5724ab54b72a8793d03a79c0 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 26 Jun 2006 12:26:12 +1000 Subject: Fix a recently introduced bug, and make --assemble more resilient to it. Make -assemble a bit more resilient to finding strange information in superblocks. Don't claim newly added spares are InSync!! (don't know why that code was ever in there) --- Assemble.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Assemble.c') diff --git a/Assemble.c b/Assemble.c index aa7eeb2..90a9c57 100644 --- a/Assemble.c +++ b/Assemble.c @@ -499,6 +499,10 @@ int Assemble(struct supertype *st, char *mddev, int mdfd, if (nextspare < info.array.raid_disks) nextspare = info.array.raid_disks; i = nextspare++; + } else { + if (i >= info.array.raid_disks && + i >= nextspare) + nextspare = i+1; } if (i < 10000) { if (i >= bestcnt) { -- cgit