aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-01-30 19:57:43 -0500
committerNeilBrown <neilb@suse.de>2011-01-30 19:57:43 -0500
commit50da08409654e036c4c964a473567a61a654cb83 (patch)
tree18a4c5edf23ec5aaf8872d9639970a99c7f16d8e
parent469518a3455c79619e9231aeffeffa2e2989f738 (diff)
md: don't abort checking spares as soon as one cannot be added.
As spares can be added manually before a reshape starts, we need to find them all to mark some of them as in_sync. Previously we would abort looking for spares when we found an unallocated spare what could not be added to the array (implying there was no room for new spares). However already-added spares could be later in the list, so we need to keep searching. Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--drivers/md/raid5.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index a6d2c3ddeee4..702812824195 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -5587,8 +5587,7 @@ static int raid5_start_reshape(mddev_t *mddev)
5587 if (sysfs_create_link(&mddev->kobj, 5587 if (sysfs_create_link(&mddev->kobj,
5588 &rdev->kobj, nm)) 5588 &rdev->kobj, nm))
5589 /* Failure here is OK */; 5589 /* Failure here is OK */;
5590 } else 5590 }
5591 break;
5592 } else if (rdev->raid_disk >= conf->previous_raid_disks 5591 } else if (rdev->raid_disk >= conf->previous_raid_disks
5593 && !test_bit(Faulty, &rdev->flags)) { 5592 && !test_bit(Faulty, &rdev->flags)) {
5594 /* This is a spare that was manually added */ 5593 /* This is a spare that was manually added */