提交 1be7892f 编写于 作者: N NeilBrown 提交者: Linus Torvalds

[PATCH] md: Fix the 'failed' count for version-0 superblocks

We are counting failed devices twice, once of the device that is failed, and
once for the hole that has been left in the array.  Remove the former so
'failed' matches 'missing'.  Storing these counts in the superblock is a bit
silly anyway....
Signed-off-by: NNeil Brown <neilb@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 c5a10f62
...@@ -895,10 +895,9 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev) ...@@ -895,10 +895,9 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev)
d->raid_disk = rdev2->raid_disk; d->raid_disk = rdev2->raid_disk;
else else
d->raid_disk = rdev2->desc_nr; /* compatibility */ d->raid_disk = rdev2->desc_nr; /* compatibility */
if (test_bit(Faulty, &rdev2->flags)) { if (test_bit(Faulty, &rdev2->flags))
d->state = (1<<MD_DISK_FAULTY); d->state = (1<<MD_DISK_FAULTY);
failed++; else if (test_bit(In_sync, &rdev2->flags)) {
} else if (test_bit(In_sync, &rdev2->flags)) {
d->state = (1<<MD_DISK_ACTIVE); d->state = (1<<MD_DISK_ACTIVE);
d->state |= (1<<MD_DISK_SYNC); d->state |= (1<<MD_DISK_SYNC);
active++; active++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册