[PATCH] md: Fix calculation of ->degraded for multipath and raid10

Two less-used md personalities have bugs in the calculation of
 ->degraded (the extent to which the array is degraded).

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
This commit is contained in:
NeilBrown
2006-10-20 13:25:30 +10:00
committed by Chris Wright
parent 563f2416b3
commit 8fb3dd17ba
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -480,7 +480,7 @@ static int multipath_run (mddev_t *mddev)
mdname(mddev));
goto out_free_conf;
}
mddev->degraded = conf->raid_disks = conf->working_disks;
mddev->degraded = conf->raid_disks - conf->working_disks;
conf->pool = mempool_create_kzalloc_pool(NR_RESERVED_BUFS,
sizeof(struct multipath_bh));
+1 -1
View File
@@ -2042,7 +2042,7 @@ static int run(mddev_t *mddev)
disk = conf->mirrors + i;
if (!disk->rdev ||
!test_bit(In_sync, &rdev->flags)) {
!test_bit(In_sync, &disk->rdev->flags)) {
disk->head_position = 0;
mddev->degraded++;
}