X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=ldiskfs%2Fkernel_patches%2Fpatches%2Frhel6.3%2Fext4-mballoc-extra-checks.patch;h=4b3104fc54b682dfdbdf73b1308bb550c72d0e17;hb=f7672143843a86656eaed5b9a8b89ce171b99d7a;hp=63eb5308343a2d8c00c957c52622a822ba941c96;hpb=574a82bd10e27c8246e66a2127b16b7d5e9d8697;p=fs%2Flustre-release.git diff --git a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-mballoc-extra-checks.patch b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-mballoc-extra-checks.patch index 63eb530..4b3104f 100644 --- a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-mballoc-extra-checks.patch +++ b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-mballoc-extra-checks.patch @@ -121,7 +121,7 @@ Index: linux-stage/fs/ext4/mballoc.c "[ %-5s %-5s %-5s %-5s %-5s %-5s %-5s " "%-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n", - "group", "free", "frags", "first", -+ "group", "free", "frags", "first", "first", "pa", ++ "group", "free", "free", "frags", "first", "pa", "2^0", "2^1", "2^2", "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10", "2^11", "2^12", "2^13"); @@ -148,7 +148,7 @@ Index: linux-stage/fs/ext4/mballoc.c for (i = 0; i <= 13; i++) seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ? sg.info.bb_counters[i] : 0); -@@ -3354,23 +3365,68 @@ +@@ -3354,23 +3365,72 @@ } /* @@ -162,6 +162,10 @@ Index: linux-stage/fs/ext4/mballoc.c +{ + unsigned short max = EXT4_BLOCKS_PER_GROUP(sb); + unsigned short i, first, free = 0; ++ unsigned short free_in_gdp = ext4_free_blks_count(sb, gdp); ++ ++ if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) ++ return 0; + + i = mb_find_next_zero_bit(bitmap, max, 0); + @@ -175,10 +179,10 @@ Index: linux-stage/fs/ext4/mballoc.c + i = mb_find_next_zero_bit(bitmap, max, i); + } + -+ if (free != ext4_free_blks_count(sb, gdp)) { ++ if (free != free_in_gdp) { + ext4_error(sb, "on-disk bitmap for group %d" + "corrupted: %u blocks free in bitmap, %u - in gd\n", -+ group, free, ext4_free_blks_count(sb, gdp)); ++ group, free, free_in_gdp); + return -EIO; + } + return 0;