Commit 563f2416 authored by NeilBrown's avatar NeilBrown Committed by Chris Wright

[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: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 1e4007bf
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment