diff options
author | NeilBrown <neilb@suse.de> | 2010-09-08 02:48:17 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-09-16 23:53:28 -0400 |
commit | ddcf3522cf03a147c867a2e0155761652dbd156a (patch) | |
tree | e5a47b7db19dc147df769b6cd8c82ac56964f6e1 /drivers/md/md.c | |
parent | 126925c090155f13e90b9e7e8c4010e96027c00a (diff) |
md: fix v1.x metadata update when a disk is missing.
If an array with 1.x metadata is assembled with the last disk missing,
md doesn't properly record the fact that the disk was missing.
This is unlikely to cause a real problem as the event count will be
different to the count on the missing disk so it won't be included in
the array. However it could still cause confusion.
So make sure we clear all the relevant slots, not just the early ones.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index bdd9bba577b0..f20d13e717d5 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1643,7 +1643,9 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1643 | bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1; | 1643 | bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1; |
1644 | if (rdev->sb_size & bmask) | 1644 | if (rdev->sb_size & bmask) |
1645 | rdev->sb_size = (rdev->sb_size | bmask) + 1; | 1645 | rdev->sb_size = (rdev->sb_size | bmask) + 1; |
1646 | } | 1646 | } else |
1647 | max_dev = le32_to_cpu(sb->max_dev); | ||
1648 | |||
1647 | for (i=0; i<max_dev;i++) | 1649 | for (i=0; i<max_dev;i++) |
1648 | sb->dev_roles[i] = cpu_to_le16(0xfffe); | 1650 | sb->dev_roles[i] = cpu_to_le16(0xfffe); |
1649 | 1651 | ||