summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-03-26 23:40:42 +0200
committerAdrian Bunk <bunk@stusta.de>2007-03-26 23:40:42 +0200
commitd03e0c61f63e3c12a5b33403c895285f4e345c35 (patch)
tree4c08a42478f54e1fbbf2638e2216c29ec59fa6c8 /drivers
parentcf2492d903eecf66613568d0a2f1a967d6ead4c1 (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. Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/md.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index adf27f232838..9957f583cb25 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3258,6 +3258,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;