From: Jonathan Brassow <jbrassow@redhat.com>
To: linux-raid@vger.kernel.org
Cc: neilb@suse.de, agk@redhat.com, jbrassow@redhat.com
Subject: Re: [PATCH] DM-RAID: Fix RAID10's check for sufficient redundancy
Date: Wed, 09 Jan 2013 20:02:32 -0600 [thread overview]
Message-ID: <1357783352.9103.7.camel@f16> (raw)
In-Reply-To: <1357783259.9103.5.camel@f16>
On Wed, 2013-01-09 at 20:00 -0600, Jonathan Brassow wrote:
> DM RAID: Fix RAID10's check for sufficient redundancy
>
> Before attempting to activate a RAID array, it is checked for sufficient
> redundancy. That is, we make sure that there are not too many failed
> devices - or devices specified for rebuild - to undermine our ability to
> activate the array. The current code performs this check twice - once to
> ensure there were not too many devices specified for rebuild by the user
> ('validate_rebuild_devices') and again after possibly experiencing a failure
> to read the superblock ('analyse_superblocks'). Neither of these checks are
> sufficient. The first check is done properly but with insufficient
> information about the possible failure state of the devices to make a good
> determination if the array can be activated. The second check is simply
> done wrong in the case of RAID10 because it doesn't account for the
> independence of the stripes (i.e. mirror sets). The solution is to use the
> properly written check ('validate_rebuild_devices'), but perform the check
> after the superblocks have been read and we know which devices have failed.
> This gives us one check instead of two and performs it in a location where
> it can be done right.
>
> Only RAID10 was affected and it was affected in the following ways:
> - the code did not properly catch the condition where a user specified
> a device for rebuild that already had a failed device in the same mirror
> set. (This condition would, however, be caught at a deeper level in MD.)
> - the code triggers a false positive and denies activation when devices in
> independent mirror sets have failed - counting the failures as though they
> were all in the same set.
>
> The most likely place this error was introduced (or this patch should have
> been included) is in commit 4ec1e369 - first introduced in v3.7-rc1.
>
> Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Neil,
This patch should apply cleanly on top of recent changes, but will not
apply cleanly on an older kernel (like 3.7) due to version # changes and
introduction of the new 'far' and 'offset' RAID10 algorithms. If you
think this fix should be pushed back into 3.7 rather than just applying
on the latest code, I will make a patch for 3.7 - although I'm not
certain how I'd handle the version number conflict.
Thanks,
brassow
next prev parent reply other threads:[~2013-01-10 2:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 2:00 [PATCH] DM-RAID: Fix RAID10's check for sufficient redundancy Jonathan Brassow
2013-01-10 2:02 ` Jonathan Brassow [this message]
2013-01-10 6:03 ` NeilBrown
2013-01-10 15:02 ` Brassow Jonathan
2013-01-22 5:52 ` NeilBrown
2013-01-23 3:42 ` [PATCH - for v3.7] " Jonathan Brassow
2013-01-24 1:17 ` 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=1357783352.9103.7.camel@f16 \
--to=jbrassow@redhat.com \
--cc=agk@redhat.com \
--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).