]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] ext3: remove mount-time diagnostic messages
authorAndrew Morton <akpm@digeo.com>
Wed, 18 Jun 2003 01:32:05 +0000 (18:32 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 18 Jun 2003 01:32:05 +0000 (18:32 -0700)
ext3 no longer keeps the filesystem-wide free blocks counter and free inodes
counter up to date all the time in the superblock.  Because that requires
fs-wide locking.  These counters are only needed at runtime for the Orlov
allocator heuristics, and we are now using a fuzzy per-cpu coutner for that.

These counters are rather unnecessary: the same info is present in the file
allocation maps and inode tables, the group descriptor blocks and the
bitmaps.

e2fsck will be changed to downgrade the seriousness of this inconsistency.

The filesystem _will_ write these numbers out in the superblock on a clean
unmount, based on the sum of the free block and inode counts in the group
descriptors.

fs/ext3/super.c

index 3ae758ed667cdd8298c411d010a177db1550a2cb..608fe3baf741084740743a46abaed7430a6e9b07 100644 (file)
@@ -901,7 +901,6 @@ static int ext3_check_descriptors (struct super_block * sb)
        struct ext3_sb_info *sbi = EXT3_SB(sb);
        unsigned long block = le32_to_cpu(sbi->s_es->s_first_data_block);
        struct ext3_group_desc * gdp = NULL;
-       unsigned long total_free;
        int desc_block = 0;
        int i;
 
@@ -949,23 +948,8 @@ static int ext3_check_descriptors (struct super_block * sb)
                gdp++;
        }
 
-       total_free = ext3_count_free_blocks(sb);
-       if (total_free != le32_to_cpu(EXT3_SB(sb)->s_es->s_free_blocks_count)) {
-               printk("EXT3-fs: invalid s_free_blocks_count %u (real %lu)\n",
-                               le32_to_cpu(EXT3_SB(sb)->s_es->s_free_blocks_count),
-                               total_free);
-               EXT3_SB(sb)->s_es->s_free_blocks_count = cpu_to_le32(total_free);
-       }
-
-       total_free = ext3_count_free_inodes(sb);
-       if (total_free != le32_to_cpu(EXT3_SB(sb)->s_es->s_free_inodes_count)) {
-               printk("EXT3-fs: invalid s_free_inodes_count %u (real %lu)\n",
-                       le32_to_cpu(EXT3_SB(sb)->s_es->s_free_inodes_count),
-                       total_free);
-               EXT3_SB(sb)->s_es->s_free_inodes_count = cpu_to_le32(total_free);
-       }
-
-
+       sbi->s_es->s_free_blocks_count=cpu_to_le32(ext3_count_free_blocks(sb));
+       sbi->s_es->s_free_inodes_count=cpu_to_le32(ext3_count_free_inodes(sb));
        return 1;
 }