summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-03-27 13:18:03 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 20:45:00 +0400
commit1be7892fffb45f6017494a88ff68fe84c6de26b4 (patch)
tree685f3d32dc97becd58262531f0827f8d3bb6e96b /drivers/md
parentc5a10f62c5c496c49db749af103b991873b7e2dc (diff)
downloadlinux-1be7892fffb45f6017494a88ff68fe84c6de26b4.tar.xz
[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: 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')
-rw-r--r--drivers/md/md.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 875bced88e36..686314f070a5 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -895,10 +895,9 @@ static void super_90_sync(mddev_t *mddev, mdk_rdev_t *rdev)
d->raid_disk = rdev2->raid_disk;
else
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);
- 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_SYNC);
active++;