Commit 18b00334 authored by Andre Noll's avatar Andre Noll Committed by NeilBrown

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

raid4 allows only one failed disk.
Signed-off-by: default avatarAndre Noll <maan@systemlinux.org>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent b522adcd
...@@ -4331,7 +4331,7 @@ static int run(mddev_t *mddev) ...@@ -4331,7 +4331,7 @@ static int run(mddev_t *mddev)
*/ */
sector_t here_new, here_old; sector_t here_new, here_old;
int old_disks; 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 || if (mddev->new_level != mddev->level ||
mddev->new_layout != mddev->layout || mddev->new_layout != mddev->layout ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment