md/raid6: Fix raid-6 read-error correction in degraded state
PATCH v2 1/1 md/raid6: Fix raid-6 read-error correction in degraded state
Fix: md 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.
--------
drivers/md/raid5.c 2010-04-28 13:08:15.000000000 +0200 renamed from drivers/md/raid5.c 2010-04-28 13:05:03.000000000 +0200 +1 -1
@@ -1527,7 +1527,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",
---------------------------------------------------------------
Resending patch:
v2: added "Tested-by" line, subsystem mentioned in summary line, body explanation mentions "md"
Thanks,
Gabriele A. Trombetti
Thanks. This is now in my queue.
I may even submit it for .34 as that doesn't seem as close as I thought.
NeilBrown
Quoted 30 lines · On Wed, 05 May 2010 21:17:53 +0200 "Gabriele A. Trombetti"…
Fix: md 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 <[email protected]>Signed-off-by Gabriele A. Trombetti <[email protected]>Reported-by Janos Haar <[email protected]>--------
---linux-2.6.34-rc5-git8-vanilla/drivers/md/raid5.c2010-04-28
13:05:03.000000000 +0200
+++linux-2.6.34-rc5-git8/drivers/md/raid5.c2010-04-28
13:08:15.000000000 +0200drivers/md/raid5.c 2010-04-28 13:08:15.000000000 +0200 renamed from drivers/md/raid5.c 2010-04-28 13:05:03.000000000 +0200 +1
-2@@ -1527,7 +1527,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", ---------------------------------------------------------------Resending patch:
v2: added "Tested-by" line, subsystem mentioned in summary line, body explanation mentions "md"Thanks,
Gabriele A. Trombetti