If the number of block groups exceeds 2**32, a bad cast would lead to
a bogus "Not enough space to build proposed filesystem while setting
up superblock" failure.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
}
retry:
- fs->group_desc_count = (blk_t) ext2fs_div64_ceil(
+ fs->group_desc_count = (dgrp_t) ext2fs_div64_ceil(
ext2fs_blocks_count(super) - super->s_first_data_block,
EXT2_BLOCKS_PER_GROUP(super));
if (fs->group_desc_count == 0) {