Commit 618b8bf2 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ext3: remove mount-time diagnostic messages

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.
parent 768fa557
...@@ -901,7 +901,6 @@ static int ext3_check_descriptors (struct super_block * sb) ...@@ -901,7 +901,6 @@ static int ext3_check_descriptors (struct super_block * sb)
struct ext3_sb_info *sbi = EXT3_SB(sb); struct ext3_sb_info *sbi = EXT3_SB(sb);
unsigned long block = le32_to_cpu(sbi->s_es->s_first_data_block); unsigned long block = le32_to_cpu(sbi->s_es->s_first_data_block);
struct ext3_group_desc * gdp = NULL; struct ext3_group_desc * gdp = NULL;
unsigned long total_free;
int desc_block = 0; int desc_block = 0;
int i; int i;
...@@ -949,23 +948,8 @@ static int ext3_check_descriptors (struct super_block * sb) ...@@ -949,23 +948,8 @@ static int ext3_check_descriptors (struct super_block * sb)
gdp++; gdp++;
} }
total_free = ext3_count_free_blocks(sb); sbi->s_es->s_free_blocks_count=cpu_to_le32(ext3_count_free_blocks(sb));
if (total_free != le32_to_cpu(EXT3_SB(sb)->s_es->s_free_blocks_count)) { sbi->s_es->s_free_inodes_count=cpu_to_le32(ext3_count_free_inodes(sb));
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);
}
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment