ext4dev oddity

Eric Sandeen sandeen at redhat.com
Thu Aug 28 21:41:03 UTC 2008


Eric Sandeen wrote:
> Trever L. Adams wrote:
>> I am having some pretty good success on some different machines with
>> ext4.
>>
>> However, I am getting this message:
>> EXT4-fs error (device dm-0): ext4_mb_generate_buddy: EXT4-fs: group 717:
>> 23410 blocks in bitmap, 23411 in gd
>>
>> EXT4-fs error (device dm-0): ext4_mb_generate_buddy: EXT4-fs: group 721:
>> 19309 blocks in bitmap, 19333 in gd
>>
>> What do I need to do to help debug this, if anything, and how do I find
>> out which files or directories are affected?
> 
> Hm, congratulations on finding the first mballoc bug in fedora :)
> 
> It looks like freespace accounting got out of sync somehow... and I
> assume this is right after a mount, right?

So, in the course of other things, I found a way to reproduce this
error.  And, just for mailing-list-posterity, it seems to be fixed,
upstream, with:

commit 0bf7e8379ce7e0159a2a6bd3d937f2f6ada79799
Author: Jose R. Santos <jrs at us.ibm.com>
Date:   Tue Jun 3 14:07:29 2008 -0400

    ext4: Fix uninit block group initialization with FLEX_BG

    With FLEX_BG block bitmaps, inode bitmaps and inode tables _MAY_ be
    allocated outside the group.  So, when initializing an uninitialized
    block bitmap, we need to check the location of this blocks before
    setting the corresponding bits in the block bitmap of the newly
    initialized group.  Also return the right number of free blocks when
    counting the available free blocks in uninit group.

    Tested-by: Aneesh Kumar K.V <aneesh.kumar at inux.vnet.ibm.com>
    Signed-off-by: Jose R. Santos <jrs at us.ibm.com>
    Signed-off-by: Mingming Cao <cmm at us.ibm.com>
    Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>

which made it to the 2.6.26 kernels.

the description sounds innocuous but in my case it was actually
corrupting memory ...

-Eric




More information about the devel mailing list