[PATCH 5/5] md/raid5: Using conf->max_degraded rather than 2 to determine whether there is excess compute-disks for raid4/5/6.

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

 



In func analyse_stripe, about judging how many want-computer disks,it
used 2.But for raid4/5, it is at most is one.So using conf->max_degraded
to replace.

Signed-off-by: Jianpeng Ma <majianpeng@xxxxxxxxx>
---
 drivers/md/raid5.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 684ca76..930dee0 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3285,7 +3285,7 @@ static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s)
 			s->uptodate++;
 		if (test_bit(R5_Wantcompute, &dev->flags)) {
 			s->compute++;
-			BUG_ON(s->compute > 2);
+			BUG_ON(s->compute > conf->max_degraded);
 		}
 
 		if (test_bit(R5_Wantfill, &dev->flags))
-- 
1.7.9.5
?韬{.n?????%??檩??w?{.n???{炳盯w???塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f



[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