diff options
author | NeilBrown <neilb@suse.de> | 2006-10-28 10:38:30 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-28 11:30:51 -0700 |
commit | 2b6e845986347ef86729e8651908af3e8a8441f5 (patch) | |
tree | dc58ac77e7b7e6ee1e6c320019b07808d3e324a6 /drivers/md/md.c | |
parent | ae74589cb381cc2838107f92d4e0e1f178c6825d (diff) | |
download | lwn-2b6e845986347ef86729e8651908af3e8a8441f5.tar.gz lwn-2b6e845986347ef86729e8651908af3e8a8441f5.zip |
[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/md/md.c')
-rw-r--r-- | drivers/md/md.c | 1 |
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 kobject_init(&rdev->kobj); rdev->desc_nr = -1; + rdev->saved_raid_disk = -1; rdev->flags = 0; rdev->data_offset = 0; rdev->sb_events = 0; |