From: NeilBrown Date: Sat, 28 Oct 2006 17:38:30 +0000 (-0700) Subject: [PATCH] md: fix bug where spares don't always get rebuilt properly when they become... X-Git-Tag: MMI-PSA29.97-13-9~45739^2~7^2~44 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2b6e845986347ef86729e8651908af3e8a8441f5;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] md: fix bug where spares don't always get rebuilt properly when they become live If save_raid_disk is >= 0, then the device could be a device that is already in sync that is being re-added. So we need to default this value to -1. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 7daa7b1e145f..c40ce9f9cc9b 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2003,6 +2003,7 @@ static mdk_rdev_t *md_import_device(dev_t newdev, int super_format, int super_mi kobject_init(&rdev->kobj); rdev->desc_nr = -1; + rdev->saved_raid_disk = -1; rdev->flags = 0; rdev->data_offset = 0; rdev->sb_events = 0;