linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]  md: raid5 run(): Fix max_degraded for raid level 4.
@ 2009-03-18 12:53 Andre Noll
  2009-03-20  0:09 ` Neil Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Andre Noll @ 2009-03-18 12:53 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]

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@systemlinux.org>
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@systemlinux.org>

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-20  9:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-18 12:53 [PATCH] md: raid5 run(): Fix max_degraded for raid level 4 Andre Noll
2009-03-20  0:09 ` Neil Brown
2009-03-20  9:14   ` [PATCH] relax checks to support 3disk raid6 arrays Andre Noll
2009-03-20  9:20     ` Peter Rabbitson
2009-03-20  9:29       ` Andre Noll

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).