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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Neil,

I found this one while trying to figure out why 3-disk raid6 arrays
aren't supported. It's an obvious and trivial bug fix but probably
not important enough for stable as it only affects raid4.

Regards
Andre

commit ea30abef4d1f3aad635eb24db082f3531b573540
Author: Andre Noll <maan@xxxxxxxxxxxxxxx>
Date:   Wed Mar 18 13:43:08 2009 +0100

    md: raid5 run(): Fix max_degraded for raid level 4.
    
    raid4 allows only one failed disk.
    
    Signed-off-by: Andre Noll <maan@xxxxxxxxxxxxxxx>

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index a76ef52..ceb5924 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4484,7 +4484,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 ||
-- 
The only person who always got his work done by Friday was Robinson Crusoe

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux