linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: MRK <gabriele.trombetti@gmail.com>
To: linux-raid <linux-raid@vger.kernel.org>, Neil Brown <neilb@suse.de>
Cc: Janos Haar <janos.haar@netcenter.hu>
Subject: [PATCH 1/1] Fix raid-6 read-error correction in degraded state
Date: Wed, 28 Apr 2010 16:07:54 +0200	[thread overview]
Message-ID: <4BD8413A.2000707@shiftmail.org> (raw)

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.

Signed-off-by: Gabriele A. Trombetti <g.trombetti.lkrnl1213@logicschema.com>
Reported-by: Janos Haar <janos.haar@netcenter.hu>
--------
--- linux-2.6.34-rc5-git8-vanilla/drivers/md/raid5.c    2010-04-28 
13:05:03.000000000 +0200
+++ linux-2.6.34-rc5-git8/drivers/md/raid5.c    2010-04-28 
13:08:15.000000000 +0200
@@ -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",

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

Thanks,
Gabriele A. Trombetti


                 reply	other threads:[~2010-04-28 14:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BD8413A.2000707@shiftmail.org \
    --to=gabriele.trombetti@gmail.com \
    --cc=janos.haar@netcenter.hu \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).