aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-10-28 13:38:30 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-28 14:30:51 -0400
commit2b6e845986347ef86729e8651908af3e8a8441f5 (patch)
treedc58ac77e7b7e6ee1e6c320019b07808d3e324a6 /drivers
parentae74589cb381cc2838107f92d4e0e1f178c6825d (diff)
[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 <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/md.c1
1 files changed, 1 insertions, 0 deletions
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
2003 kobject_init(&rdev->kobj); 2003 kobject_init(&rdev->kobj);
2004 2004
2005 rdev->desc_nr = -1; 2005 rdev->desc_nr = -1;
2006 rdev->saved_raid_disk = -1;
2006 rdev->flags = 0; 2007 rdev->flags = 0;
2007 rdev->data_offset = 0; 2008 rdev->data_offset = 0;
2008 rdev->sb_events = 0; 2009 rdev->sb_events = 0;