]> git.itanic.dy.fi Git - linux-stable/commit
[PATCH] md: fix --re-add for raid1 and raid6
authorNeilBrown <neilb@suse.de>
Mon, 28 Nov 2005 21:44:13 +0000 (13:44 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 28 Nov 2005 22:42:26 +0000 (14:42 -0800)
commit6aea114a728db9296f42102d4885e7fb035de0a9
treefa03f942fea0fef446a10cba423f2eee890c5d89
parentb2a2703c282ce77d189a250f58039daac1da3314
[PATCH] md: fix --re-add for raid1 and raid6

If you have an array with a write-intent-bitmap, and you remove a device, then
re-add it, a full recovery isn't needed.  We detect a re-add by looking at
saved_raid_disk.  For raid1, it doesn't matter which disk it was, only whether
or not it was an active device.  The old code being removed set a value of
'mirror' which was then ignored, so it can go.  The changed code performs the
correct check.

For raid6, if there are two missing devices, make sure we chose the right slot
on --re-add rather than always the first slot.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/raid1.c
drivers/md/raid6main.c