ext2fs_mark_block_bitmap2(bmap, new_blk);
ext2fs_block_bitmap_loc_set(fs, group, new_blk);
if (flexbg_size) {
- dgrp_t gr = ext2fs_group_of_blk(fs, new_blk);
+ dgrp_t gr = ext2fs_group_of_blk2(fs, new_blk);
ext2fs_bg_free_blocks_count_set(fs, gr, ext2fs_bg_free_blocks_count(fs, gr) - 1);
ext2fs_free_blocks_count_add(fs->super, -1);
ext2fs_bg_flags_clear(fs, gr, EXT2_BG_BLOCK_UNINIT);
ext2fs_mark_block_bitmap2(bmap, new_blk);
ext2fs_inode_bitmap_loc_set(fs, group, new_blk);
if (flexbg_size) {
- dgrp_t gr = ext2fs_group_of_blk(fs, new_blk);
+ dgrp_t gr = ext2fs_group_of_blk2(fs, new_blk);
ext2fs_bg_free_blocks_count_set(fs, gr, ext2fs_bg_free_blocks_count(fs, gr) - 1);
ext2fs_free_blocks_count_add(fs->super, -1);
ext2fs_bg_flags_clear(fs, gr, EXT2_BG_BLOCK_UNINIT);
j++, blk++) {
ext2fs_mark_block_bitmap2(bmap, blk);
if (flexbg_size) {
- dgrp_t gr = ext2fs_group_of_blk(fs, blk);
+ dgrp_t gr = ext2fs_group_of_blk2(fs, blk);
ext2fs_bg_free_blocks_count_set(fs, gr, ext2fs_bg_free_blocks_count(fs, gr) - 1);
ext2fs_free_blocks_count_add(fs->super, -1);
ext2fs_bg_flags_clear(fs, gr,
* the filesystem. Pick a group that has the largest number
* of free blocks.
*/
- group = ext2fs_group_of_blk(fs, (ext2fs_blocks_count(fs->super) -
+ group = ext2fs_group_of_blk2(fs, (ext2fs_blocks_count(fs->super) -
fs->super->s_first_data_block) / 2);
log_flex = 1 << fs->super->s_log_groups_per_flex;
if (fs->super->s_log_groups_per_flex && (group > log_flex)) {
" bad blocks.\n\n"),
group_block);
group_bad++;
- group = ext2fs_group_of_blk(fs, group_block+j);
+ group = ext2fs_group_of_blk2(fs, group_block+j);
ext2fs_bg_free_blocks_count_set(fs, group, ext2fs_bg_free_blocks_count(fs, group) + 1);
ext2fs_group_desc_csum_set(fs, group);
ext2fs_free_blocks_count_add(fs->super, 1);
block = *blocknr;
ext2fs_unmark_block_bitmap2(fs->block_map, block);
- group = ext2fs_group_of_blk(fs, block);
+ group = ext2fs_group_of_blk2(fs, block);
ext2fs_bg_free_blocks_count_set(fs, group, ext2fs_bg_free_blocks_count(fs, group) + 1);
ext2fs_group_desc_csum_set(fs, group);
ext2fs_free_blocks_count_add(fs->super, 1);
*/
for (blk = ext2fs_blocks_count(fs->super);
blk < ext2fs_blocks_count(old_fs->super); blk++) {
- g = ext2fs_group_of_blk(fs, blk);
+ g = ext2fs_group_of_blk2(fs, blk);
if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
EXT4_FEATURE_RO_COMPAT_GDT_CSUM) &&
ext2fs_bg_flags_test(old_fs, g, EXT2_BG_BLOCK_UNINIT)) {