Maximum blocks per group

Ingo
2009-06-26
2013-04-24
  • Ingo
    Ingo
    2009-06-26

    Hi,

    I've got a HDD with an ext2 partition which was created by my digital TV STB and uses a 32 KB block size. Since I can't mount it on my IA-32 linux box by using the ext2/3 implementation that ships with the kernel (block size limit of 4 KB) I've tried it with fuse-ext2 release 0.0.5.

    Out of the box it didn't worked, but after some debugging/printf-ing I found out that there was a problem during mounting. In openfs.c there's a check that ensures that ... blocks_per_group > EXT2_MAX_BLOCKS_PER_GROUP(fs->super) ... shouldn't be ok. I've checked the value of the partition's super block and found out that blocks_per_group is 65536 which indeed is larger than 65528. I've commented out this condition and tried a read-only mount and .... it worked ;)

    So my question is - where does this limit of maximum blocks per group (2^16 - 8) come from? Is 65536 an invalid number for the number of blocks per group? Are there any implications of my work-around (ommiting this check)?

    Thanks in advance,
    Ingo