diff options
author | Neil Brown <neilb@suse.de> | 2006-10-03 17:15:00 +1000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-10-13 13:23:27 -0700 |
commit | b9dca3d3ad4a97f60b7364a69d6be97843ba653d (patch) | |
tree | ba5520367d16aba8ef63c90a8a4c25ee19fc1727 /drivers/md | |
parent | 92a86ee1f6027881b77b75d48a09e3a946a93d13 (diff) |
MD: Fix problem where hot-added drives are not resynced.
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>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 8dbab2ef388..c9d2919347d 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -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; |