• NeilBrown's avatar
    [PATCH] md: fix --re-add for raid1 and raid6 · 6aea114a
    NeilBrown authored
    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: default avatarNeil Brown <neilb@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    6aea114a
raid1.c 46.6 KB