linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] RAID-6 check standalone code cleanup
Date: Thu, 14 Apr 2011 17:32:27 +1000	[thread overview]
Message-ID: <20110414173227.75c9fede@notabene.brown> (raw)
In-Reply-To: <20110406180202.GA3267@lazy.lzy>

On Wed, 6 Apr 2011 20:02:02 +0200 Piergiorgio Sartor
<piergiorgio.sartor@nexgo.de> wrote:

> Hi Neil,
> 
> On Tue, Apr 05, 2011 at 09:12:42AM +1000, NeilBrown wrote:
> > On Mon, 4 Apr 2011 19:52:42 +0200 Piergiorgio Sartor
> > <piergiorgio.sartor@nexgo.de> wrote:
> > 
> > > Hi Neil,
> > > 
> > > please find below a second patch to "raid6check.c".
> > > This applies on top of the previous one.
> > > 
> > > Major change is code cleanup and simplification.
> > > Furthermore, a better error handling and a couple
> > > of bug fixes.
> > > Last but not least, the command line parameters are
> > > changed from "bytes" to "stripes", which is more
> > > convenient, I guess.
> > 
> > Thanks - I've applied this.
> 
> please find attached very below the fix for the
> component list scanning. Taking care, hopefully,
> to skip/avoid spare drives.
> Furthermore, I added also a check for degraded
> array, which should not be checked.
> 
> > I'm not sure about using 'stripes', though it would be hard to argue in
> > favour of 'bytes'.
> > Possibly the best number to use would be 'sectors' as that is how the kernel
> > would report an inconsistency.
> > 
> > Once the code settles and you work out what the expected usage pattern would
> > be, it might then be obvious what the best number is.  i.e. try to document
> > how it would be use and if you find yourself describing complex calculations,
> > then change the program so it does the the calculations and you document can
> > avoid the complexity.
> 
> I switched to "stripes" because the code is using theme
> all over and because I was continuosly calculating from
> stripe to bytes.
> 
> I guess you're right, later it will be possible to decided
> which is the better unit for command line and for the
> error reporting.
> 
> > > 
> > > If you prefer, I can send a single patch, including
> > > in one shot the last one and this one.
> > 
> > no, multiple patches are much better - thanks.
> > 
> > As for the granularity for suspend/check/fix/unsuspend, I suspect that 
> > per-stripe would be best.
> > A smaller size wouldn't work, and a bigger size would only be helpful if
> > there were lots and lots of fixes needed ... which hopefully won't be the
> > case.
> 
> The suspend story might be a bit more complex than
> I was considering.
> 
> For example, what will happen if the user hits ctrl-c
> while the array is suspended?
> Maybe the signals will have to be blocked or re-routed
> to a proper cleanup function.
> How about kill -9?

Definitely catch signals like SIGTERM SIGINT SIGQUIT.

There is nothing you can do about SIGKILL - if someone sends that, it is
their own fault if things break.

> 
> Second issue, the stripe in the array should be suspend
> also in case the user wants a correction to happen.
> In this situation, the suspend should include read, check
> and write, since it will not be possible to allow some
> other access in between the operations.
> Could it be this is too long time for the stripe to be
> blocked?
> 
> Maybe it would be simpler to require the arrays is in
> read only mode....
> 
> What do you think?
> 

Certainly encouraging - in the documentation - the array to not be in active
use while you check/fix it would be a good thing.
But a read/check/write should not take more than a few dozen milliseconds.
Suspending IO for that long shouldn't be a problem.

NeilBrown


  parent reply	other threads:[~2011-04-14  7:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21 20:45 [PATCH] RAID-6 check standalone Piergiorgio Sartor
2011-03-07 19:33 ` Piergiorgio Sartor
2011-03-21  3:02 ` NeilBrown
2011-03-21 10:40   ` Piergiorgio Sartor
2011-03-21 11:04     ` NeilBrown
2011-03-21 11:54       ` Piergiorgio Sartor
2011-03-21 22:59         ` NeilBrown
2011-03-31 18:53           ` [PATCH] RAID-6 check standalone md device Piergiorgio Sartor
     [not found]             ` <4D96597C.1020103@tuxes.nl>
     [not found]               ` <20110402071310.GA2640@lazy.lzy>
2011-04-02 10:33                 ` Bas van Schaik
2011-04-02 11:03                   ` Piergiorgio Sartor
2011-04-04 23:01             ` NeilBrown
2011-04-05 19:56               ` Piergiorgio Sartor
2011-04-04 17:52           ` [PATCH] RAID-6 check standalone code cleanup Piergiorgio Sartor
2011-04-04 23:12             ` NeilBrown
2011-04-06 18:02               ` Piergiorgio Sartor
2011-04-13 20:48                 ` [PATCH] RAID-6 check standalone fix component list parsing Piergiorgio Sartor
2011-04-14  7:29                   ` NeilBrown
2011-04-14  7:32                 ` NeilBrown [this message]
2011-05-08 18:54               ` [PATCH] RAID-6 check standalone suspend array Piergiorgio Sartor
2011-05-09  1:45                 ` NeilBrown
2011-05-09 18:43                   ` [PATCH] RAID-6 check standalone suspend array V2.0 Piergiorgio Sartor
2011-05-15 21:15                     ` Piergiorgio Sartor
2011-05-16 10:08                       ` NeilBrown
2011-07-20 17:57                         ` Piergiorgio Sartor
2011-07-22  6:41                           ` Luca Berra
2011-07-25 18:53                             ` Piergiorgio Sartor
2011-07-26  5:25                           ` NeilBrown
2011-08-07 17:09                             ` [PATCH] RAID-6 check standalone man page Piergiorgio Sartor
2011-08-09  0:43                               ` NeilBrown

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=20110414173227.75c9fede@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=piergiorgio.sartor@nexgo.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).