[105/117] md/raid6: Fix raid-6 read-error correction in degraded state

From: Greg KH
Date: Mon May 10 2010 - 19:27:45 EST


2.6.33-stable review patch. If anyone has any objections, please let us know.

------------------

From: Gabriele A. Trombetti <g.trombetti.lkrnl1213@xxxxxxxxxxxxxxx>

commit 87aa63000c484bfb9909989316f615240dfee018 upstream.

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@xxxxxxxxxxxx>
Signed-off-by: Gabriele A. Trombetti <g.trombetti.lkrnl1213@xxxxxxxxxxxxxxx>
Reported-by: Janos Haar <janos.haar@xxxxxxxxxxxx>
Signed-off-by: NeilBrown <neilb@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/md/raid5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1526,7 +1526,7 @@ static void raid5_end_read_request(struc

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
"raid5:%s: read error not correctable "
"(sector %llu on %s).\n",


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/