From 563f2416b31884d196f194bcca580f8226b1dc4a Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 23 Oct 2006 17:07:48 +1000 Subject: [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: Greg Kroah-Hartman Signed-off-by: Chris Wright --- drivers/md/md.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/md.c b/drivers/md/md.c index c9d2919347df..1869e819afb8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1994,6 +1994,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; -- cgit v1.2.3