* PULL REQUEST - serious md/RAID10 bug in 3.1 when activating a hot-spare.
@ 2011-10-31 2:08 NeilBrown
2011-10-31 5:04 ` Brad Campbell
0 siblings, 1 reply; 5+ messages in thread
From: NeilBrown @ 2011-10-31 2:08 UTC (permalink / raw)
To: Linus Torvalds, linux RAID, lkml
[-- Attachment #1: Type: text/plain, Size: 2024 bytes --]
Hi Linus et al,
I just discovered a fairly serious flaw that I introduced into 3.1 - details
below.
Anyone running RAID10 with 3.1 is advised to either apply this patch or
revert an earlier kernel as soon as possible. In the mean time, remove any
hot spares from an RAID10 array.
NeilBrown
The following changes since commit d890fa2b0586b6177b119643ff66932127d58afa:
md: Fix some bugs in recovery_disabled handling. (2011-10-26 11:54:39 +1100)
are available in the git repository at:
git://neil.brown.name/md for-linus
last commit being 7fcc7c8acf0fba44d19a713207af7e58267c1179
NeilBrown (1):
md/raid10: Fix bug when activating a hot-spare.
drivers/md/raid10.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 7fcc7c8acf0fba44d19a713207af7e58267c1179
Author: NeilBrown <neilb@suse.de>
Date: Mon Oct 31 12:59:44 2011 +1100
md/raid10: Fix bug when activating a hot-spare.
This is a fairly serious bug in RAID10.
When a RAID10 array is degraded and a hot-spare is activated, the
spare does not take up the empty slot, but rather replaces the first
working device.
This is likely to make the array non-functional. It would normally
be possible to recover the data, but that would need care and is not
guaranteed.
This bug was introduced in commit
2bb77736ae5dca0a189829fbb7379d43364a9dac
which first appeared in 3.1.
Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 132c18e..c025a82 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1355,7 +1355,7 @@ static int raid10_add_disk(struct mddev *mddev, struct md_rdev *rdev)
struct mirror_info *p = &conf->mirrors[mirror];
if (p->recovery_disabled == mddev->recovery_disabled)
continue;
- if (!p->rdev)
+ if (p->rdev)
continue;
disk_stack_limits(mddev->gendisk, rdev->bdev,
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: PULL REQUEST - serious md/RAID10 bug in 3.1 when activating a hot-spare.
2011-10-31 2:08 PULL REQUEST - serious md/RAID10 bug in 3.1 when activating a hot-spare NeilBrown
@ 2011-10-31 5:04 ` Brad Campbell
2011-10-31 5:34 ` Brad Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Brad Campbell @ 2011-10-31 5:04 UTC (permalink / raw)
To: NeilBrown; +Cc: linux RAID
On 31/10/11 10:08, NeilBrown wrote:
>
> Hi Linus et al,
>
> I just discovered a fairly serious flaw that I introduced into 3.1 - details
> below.
>
> Anyone running RAID10 with 3.1 is advised to either apply this patch or
> revert an earlier kernel as soon as possible. In the mean time, remove any
> hot spares from an RAID10 array.
>
G'day Neil,
Is that the issue I bumped up against here?
http://permalink.gmane.org/gmane.linux.raid/35805
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PULL REQUEST - serious md/RAID10 bug in 3.1 when activating a hot-spare.
2011-10-31 5:04 ` Brad Campbell
@ 2011-10-31 5:34 ` Brad Campbell
2011-10-31 5:49 ` NeilBrown
0 siblings, 1 reply; 5+ messages in thread
From: Brad Campbell @ 2011-10-31 5:34 UTC (permalink / raw)
To: NeilBrown; +Cc: linux RAID
On 31/10/11 13:04, Brad Campbell wrote:
> On 31/10/11 10:08, NeilBrown wrote:
>>
>> Hi Linus et al,
>>
>> I just discovered a fairly serious flaw that I introduced into 3.1 -
>> details
>> below.
>>
>> Anyone running RAID10 with 3.1 is advised to either apply this patch or
>> revert an earlier kernel as soon as possible. In the mean time, remove
>> any
>> hot spares from an RAID10 array.
>>
>
> G'day Neil,
>
> Is that the issue I bumped up against here?
>
> http://permalink.gmane.org/gmane.linux.raid/35805
After looking closer I can confirm that making the indicated change
resolves this problem.
Regards,
Brad
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PULL REQUEST - serious md/RAID10 bug in 3.1 when activating a hot-spare.
2011-10-31 5:34 ` Brad Campbell
@ 2011-10-31 5:49 ` NeilBrown
2011-10-31 6:10 ` Brad Campbell
0 siblings, 1 reply; 5+ messages in thread
From: NeilBrown @ 2011-10-31 5:49 UTC (permalink / raw)
To: Brad Campbell; +Cc: linux RAID
[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]
On Mon, 31 Oct 2011 13:34:10 +0800 Brad Campbell <lists2009@fnarfbargle.com>
wrote:
> On 31/10/11 13:04, Brad Campbell wrote:
> > On 31/10/11 10:08, NeilBrown wrote:
> >>
> >> Hi Linus et al,
> >>
> >> I just discovered a fairly serious flaw that I introduced into 3.1 -
> >> details
> >> below.
> >>
> >> Anyone running RAID10 with 3.1 is advised to either apply this patch or
> >> revert an earlier kernel as soon as possible. In the mean time, remove
> >> any
> >> hot spares from an RAID10 array.
> >>
> >
> > G'day Neil,
> >
> > Is that the issue I bumped up against here?
> >
> > http://permalink.gmane.org/gmane.linux.raid/35805
>
> After looking closer I can confirm that making the indicated change
> resolves this problem.
Yes, definitely the same problem.
It's a shame I didn't pay proper attention to that report at the time - I
think that was the day that the uSD in my phone died and I was somewhat
distracted trying to figure out how to rebuild the install from scratch :-(
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PULL REQUEST - serious md/RAID10 bug in 3.1 when activating a hot-spare.
2011-10-31 5:49 ` NeilBrown
@ 2011-10-31 6:10 ` Brad Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Brad Campbell @ 2011-10-31 6:10 UTC (permalink / raw)
To: NeilBrown; +Cc: linux RAID
On 31/10/11 13:49, NeilBrown wrote:
>>> G'day Neil,
>>>
>>> Is that the issue I bumped up against here?
>>>
>>> http://permalink.gmane.org/gmane.linux.raid/35805
>>
>> After looking closer I can confirm that making the indicated change
>> resolves this problem.
>
> Yes, definitely the same problem.
> It's a shame I didn't pay proper attention to that report at the time - I
> think that was the day that the uSD in my phone died and I was somewhat
> distracted trying to figure out how to rebuild the install from scratch :-(
Well, like I said in the original mail, no harm done and no urgency.I
simply applied the patch, rebooted and added the drive. Job done and no
hangover.
Those little flash devices don't seem to be as robust as we'd expect
them to be. I've had several failures recently that can't be explained
by early life, nor excessive wear. I just don't trust them anymore.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-31 6:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-31 2:08 PULL REQUEST - serious md/RAID10 bug in 3.1 when activating a hot-spare NeilBrown
2011-10-31 5:04 ` Brad Campbell
2011-10-31 5:34 ` Brad Campbell
2011-10-31 5:49 ` NeilBrown
2011-10-31 6:10 ` Brad Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox