aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/raid5.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 9c66e5997fc8..c1b0d52bfcb0 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2917,8 +2917,11 @@ static int fetch_block(struct stripe_head *sh, struct stripe_head_state *s,
2917 (sh->raid_conf->level <= 5 && s->failed && fdev[0]->towrite && 2917 (sh->raid_conf->level <= 5 && s->failed && fdev[0]->towrite &&
2918 (!test_bit(R5_Insync, &dev->flags) || test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) && 2918 (!test_bit(R5_Insync, &dev->flags) || test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) &&
2919 !test_bit(R5_OVERWRITE, &fdev[0]->flags)) || 2919 !test_bit(R5_OVERWRITE, &fdev[0]->flags)) ||
2920 (sh->raid_conf->level == 6 && s->failed && s->to_write && 2920 ((sh->raid_conf->level == 6 ||
2921 s->to_write - s->non_overwrite < sh->raid_conf->raid_disks - 2 && 2921 sh->sector >= sh->raid_conf->mddev->recovery_cp)
2922 && s->failed && s->to_write &&
2923 (s->to_write - s->non_overwrite <
2924 sh->raid_conf->raid_disks - sh->raid_conf->max_degraded) &&
2922 (!test_bit(R5_Insync, &dev->flags) || test_bit(STRIPE_PREREAD_ACTIVE, &sh->state))))) { 2925 (!test_bit(R5_Insync, &dev->flags) || test_bit(STRIPE_PREREAD_ACTIVE, &sh->state))))) {
2923 /* we would like to get this block, possibly by computing it, 2926 /* we would like to get this block, possibly by computing it,
2924 * otherwise read it if the backing disk is insync 2927 * otherwise read it if the backing disk is insync