diff options
author | Neil Brown <neilb@suse.de> | 2007-03-26 23:41:22 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2007-03-26 23:41:22 +0200 |
commit | c920d11e0b9a2c894b99cf9a95cbd83f53c533eb (patch) | |
tree | bfe5ac8e8c02e2434cfebbfb4f9fc28e608ed046 /drivers | |
parent | d03e0c61f63e3c12a5b33403c895285f4e345c35 (diff) |
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: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers')
-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 9957f583cb25..0471ebff482f 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1812,6 +1812,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; atomic_set(&rdev->nr_pending, 0); |