From: Neil Brown Date: Tue, 3 Oct 2006 07:15:00 +0000 (+1000) Subject: MD: Fix problem where hot-added drives are not resynced. X-Git-Tag: v2.6.18.1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9dca3d3ad4a97f60b7364a69d6be97843ba653d;p=thirdparty%2Fkernel%2Fstable.git 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 Cc: Cc: Richard Bollinger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 8dbab2ef38857..c9d2919347df5 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;