From: Gabriele A. Trombetti Date: Wed, 28 Apr 2010 01:51:17 +0000 (+1000) Subject: md/raid6: Fix raid-6 read-error correction in degraded state X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7b0bb5368a7195606eca475d9f4e291ab7227052;p=openwrt%2Fstaging%2Fblogic.git md/raid6: Fix raid-6 read-error correction in degraded state 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 Signed-off-by: Gabriele A. Trombetti Reported-by: Janos Haar Signed-off-by: NeilBrown Cc: stable@kernel.org --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index cee9f93b35c4..eacf02a6ec5f 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -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",