]> git.hungrycats.org Git - linux/commitdiff
MD: Fix problem where hot-added drives are not resynced.
authorNeil Brown <neilb@suse.de>
Tue, 3 Oct 2006 07:15:00 +0000 (17:15 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Oct 2006 20:23:27 +0000 (13:23 -0700)
If a drive is added with HOT_ADD_DISK rather than ADD_NEW_DISK,
saved_raid_disk isn't initialised properly, and the drive can be
included in the array without a resync.

From: Neil Brown <neilb@suse.de>
Cc: <syrius.ml@no-log.org>
Cc: Richard Bollinger <rabollinger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/md.c

index 8dbab2ef38857f1f0cff938701869e3b067d7b44..c9d2919347df55c9db187571206f33e6e1619bf0 100644 (file)
@@ -3867,6 +3867,7 @@ static int hot_add_disk(mddev_t * mddev, dev_t dev)
        }
        clear_bit(In_sync, &rdev->flags);
        rdev->desc_nr = -1;
+       rdev->saved_raid_disk = -1;
        err = bind_rdev_to_array(rdev, mddev);
        if (err)
                goto abort_export;