]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] md: Fix the 'failed' count for version-0 superblocks
authorNeilBrown <neilb@suse.de>
Mon, 27 Mar 2006 09:18:03 +0000 (01:18 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 27 Mar 2006 16:45:00 +0000 (08:45 -0800)
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>
drivers/md/md.c

index 875bced88e367e647be08b939f8212d246a9713a..686314f070a5fc8b2da4686afa756f579bae1989 100644 (file)
@@ -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++;