From: NeilBrown Date: Fri, 6 Oct 2006 07:44:04 +0000 (-0700) Subject: [PATCH] md: fix bug where new drives added to an md array sometimes don't sync properly X-Git-Tag: v2.6.19-rc2~293 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5842730de179405d80649231faa0b3f254477434;p=linux-2.6 [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: Neil Brown Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index cb8281605b..57fa64f93e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3849,6 +3849,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;