On a filesystem with more than 2^32 blocks, the block group checksum test will
fail because "i" (the group number) is a 32-bit quantity that is used to
calculate the group's block bitmap block number. Unfortunately, "i" is not
automatically promoted to 64-bit for this calculation and overflows. When this
happens, e2fsck will incorrectly report bitmap checksum errors.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
blk_itr = EXT2FS_B2C(ctx->fs,
ctx->fs->super->s_first_data_block) +
- (i * (nbytes << 3));
+ ((blk64_t) i * (nbytes << 3));
retval = ext2fs_get_block_bitmap_range2(ctx->fs->block_map,
blk_itr, nbytes << 3,
buf);