linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* MD RAID 1 fail/remove/add corruption in 3.10
@ 2013-07-16 18:49 Joe Lawrence
  2013-07-16 19:05 ` Joe Lawrence
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Joe Lawrence @ 2013-07-16 18:49 UTC (permalink / raw)
  To: linux-raid; +Cc: NeilBrown, Martin Wilck

Hi Neil, Martin,

While testing patches to fix RAID1 repair GPF crash w/3.10-rc7
( http://thread.gmane.org/gmane.linux.raid/43351 ), I encountered disk
corruption when repeatedly failing, removing, and adding MD RAID1
component disks to their array.  The RAID1 was created with an internal
write bitmap and the test was run against alternating disks in the
set.  I bisected this behavior back to commit 7ceb17e8 "md: Allow
devices to be re-added to a read-only array", specifically these lines
of code:

remove_and_add_spares:

+		if (rdev->saved_raid_disk >= 0 && mddev->in_sync) {
+			spin_lock_irq(&mddev->write_lock);
+			if (mddev->in_sync)
+				/* OK, this device, which is in_sync,
+				 * will definitely be noticed before
+				 * the next write, so recovery isn't
+				 * needed.
+				 */
+				rdev->recovery_offset = mddev->recovery_cp;
+			spin_unlock_irq(&mddev->write_lock);
+		}
+		if (mddev->ro && rdev->recovery_offset != MaxSector)
+			/* not safe to add this disk now */
+			continue;

when I #ifdef 0 these lines out, leaving rdev->recovery_offset = 0,
then my tests run without incident.

If there is any instrumentation I can apply to remove_and_add_spares
I'll be happy to gather more data.  I'll send an attached copy of
my test programs in a reply so this mail doesn't get bounced by
any spam filters.

Thanks,

-- Joe

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-17  4:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16 18:49 MD RAID 1 fail/remove/add corruption in 3.10 Joe Lawrence
2013-07-16 19:05 ` Joe Lawrence
2013-07-17  2:52 ` Brad Campbell
2013-07-17  4:53   ` NeilBrown
2013-07-17  4:52 ` NeilBrown

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).