Skip to content

Commit

Permalink
[PATCH] md: fix bug where spares don't always get rebuilt properly wh…
Browse files Browse the repository at this point in the history
…en 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 <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Oct 28, 2006
1 parent ae74589 commit 2b6e845
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2b6e845

Please sign in to comment.