Commit 5842730d authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[PATCH] md: fix bug where new drives added to an md array sometimes don't sync properly

This fixes a bug introduced in 2.6.18.

If a drive is added to a raid1 using older tools (mdadm-1.x or raidtools)
then it will be included in the array without any resync happening.

It has been submitted for 2.6.18.1.
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ec5a19dd
...@@ -3849,6 +3849,7 @@ static int hot_add_disk(mddev_t * mddev, dev_t dev) ...@@ -3849,6 +3849,7 @@ static int hot_add_disk(mddev_t * mddev, dev_t dev)
} }
clear_bit(In_sync, &rdev->flags); clear_bit(In_sync, &rdev->flags);
rdev->desc_nr = -1; rdev->desc_nr = -1;
rdev->saved_raid_disk = -1;
err = bind_rdev_to_array(rdev, mddev); err = bind_rdev_to_array(rdev, mddev);
if (err) if (err)
goto abort_export; goto abort_export;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment