md: raid5 run(): Fix max_degraded for raid level 4.

raid4 allows only one failed disk.

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Andre Noll 2009-03-31 15:00:56 +11:00 committed by NeilBrown
parent b522adcde9
commit 18b0033491

View File

@ -4331,7 +4331,7 @@ static int run(mddev_t *mddev)
*/
sector_t here_new, here_old;
int old_disks;
int max_degraded = (mddev->level == 5 ? 1 : 2);
int max_degraded = (mddev->level == 6 ? 2 : 1);
if (mddev->new_level != mddev->level ||
mddev->new_layout != mddev->layout ||