linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Hardy Flor <Flor@ptbl-gmbh.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: mini change of raid5.c
Date: Thu, 10 Nov 2011 09:15:47 +1100	[thread overview]
Message-ID: <20111110091547.19b96e9b@notabene.brown> (raw)
In-Reply-To: <4EBA5E5D0200004000001B21@ptbl-mail.dnsalias.net>

[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]

On Wed, 09 Nov 2011 11:05:01 +0100 "Hardy Flor" <Flor@ptbl-gmbh.de> wrote:

> Hello Mr Brown,
> 
> can you please transmit this small change to the file raid5.c? There is
> thus a rapid repair of a raid6 possible, using only the defective areas
> must be checked. This change writes only the error position in the log
> during the function "check".
> 
> Kind regards
> 
> Hardy Flor

Hi Hardy,
 thanks for suggesting that change.

There a couple of problems with it that would need to be fixed though.

Firstly, it print the 'Q' block for RAID5.  However there is no Q block for
RAID5 so that is just distracting noise which is easy to remove.

Secondly - and more significantly - if you create a new RAID6 array with this
patch, you can expect every stripe to have incorrect parity, so you will get
a message for every single stripe which would not be good.

I don't really think that printk is the best way to get useful data from the
kernel.  I would prefer that raid5 kept a list of sectors internally and made
them available through a file in sysfs. e.g. ..../md/mismatch_list.
You could then enhance raid6check.c (part of 'mdadm') to read that file and
explain exactly what is happening at each offset.

We would need to limit the number of addresses reported.  If we just
allocated one page and treated it as an array of 256 64bit numbers that would
probably be sufficient.

Would you like to try coding that approach?

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

      reply	other threads:[~2011-11-09 22:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09 10:05 mini change of raid5.c Hardy Flor
2011-11-09 22:15 ` NeilBrown [this message]

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=20111110091547.19b96e9b@notabene.brown \
    --to=neilb@suse.de \
    --cc=Flor@ptbl-gmbh.de \
    --cc=linux-raid@vger.kernel.org \
    /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).