Re: Set disk faulty / hot disk remove ioctl bug for read-only MD?
From: Sebastian Riemer <hidden>
Date: 2013-02-14 12:23:01
On 13.02.2013 22:55, NeilBrown wrote:
On Wed, 13 Feb 2013 15:30:30 +0100 Sebastian Riemer [off-list ref] wrote:quoted
Damn, I've got a kernel which still crashes in reap_sync_thread->raid1_spare_active() with NULL pointer dereference although this patch is applied. So the fix isn't correct, yet. I did some "objdump -S" on raid1.ko and found the issue at the following code location in raid1_spare_active(): # for (i = 0; i < conf->raid_disks; i++) { # struct md_rdev *rdev = conf->mirrors[i].rdev; # struct md_rdev *repl = conf->mirrors[conf->raid_disks + i].rdev; A resync was pending (create without --assume-clean). For me it looks like the faulty setting races with the syncer. The rdev isn't registered in the personality anymore but the syncer tries to access it for immediate resync.Where exactly is it crashing? Can I see the complete Oops message? The code you have identified cannot crash unless conf->raid_disks has become inconsistent with the allocation of ->mirrors, and that is very unlikely. Both 'rdev' and 'repl' are tested for NULL before they are used...
Sorry, turned out to be a local issue. In an own check directly in the next line I've forgotten to check rdev for NULL. Thanks for the help! I'm developing a raw-to-md migration at the moment. With that I can let MD sync from a device without an MD superblock to a device with MD superblock. Cheers, Sebastian