Skip to content

Commit

Permalink
md/raid6: Fix raid-6 read-error correction in degraded state
Browse files Browse the repository at this point in the history
Fix: Raid-6 was not trying to correct a read-error when in
singly-degraded state and was instead dropping one more device, going to
doubly-degraded state. This patch fixes this behaviour.

Tested-by: Janos Haar <janos.haar@netcenter.hu>
Signed-off-by: Gabriele A. Trombetti <g.trombetti.lkrnl1213@logicschema.com>
Reported-by: Janos Haar <janos.haar@netcenter.hu>
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
  • Loading branch information
Gabriele A. Trombetti authored and NeilBrown committed May 18, 2010
1 parent 75a73a2 commit 7b0bb53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ static void raid5_end_read_request(struct bio * bi, int error)

clear_bit(R5_UPTODATE, &sh->dev[i].flags);
atomic_inc(&rdev->read_errors);
if (conf->mddev->degraded)
if (conf->mddev->degraded >= conf->max_degraded)
printk_rl(KERN_WARNING
"md/raid:%s: read error not correctable "
"(sector %llu on %s).\n",
Expand Down

0 comments on commit 7b0bb53

Please sign in to comment.