diff options
-rw-r--r-- | lib/ext2fs/alloc_tables.c | 6 | ||||
-rw-r--r-- | lib/ext2fs/mkjournal.c | 2 | ||||
-rw-r--r-- | misc/mke2fs.c | 2 | ||||
-rw-r--r-- | misc/tune2fs.c | 2 | ||||
-rw-r--r-- | resize/resize2fs.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/lib/ext2fs/alloc_tables.c b/lib/ext2fs/alloc_tables.c index 696829f0..e104abc4 100644 --- a/lib/ext2fs/alloc_tables.c +++ b/lib/ext2fs/alloc_tables.c @@ -140,7 +140,7 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group, 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); @@ -168,7 +168,7 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group, 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); @@ -202,7 +202,7 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group, 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, diff --git a/lib/ext2fs/mkjournal.c b/lib/ext2fs/mkjournal.c index 8d5bf01d..6afbbde3 100644 --- a/lib/ext2fs/mkjournal.c +++ b/lib/ext2fs/mkjournal.c @@ -321,7 +321,7 @@ static errcode_t write_journal_inode(ext2_filsys fs, ext2_ino_t journal_ino, * 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)) { diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 4fb6dfe4..15593685 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -273,7 +273,7 @@ _("Warning: the backup superblock/group descriptors at block %u contain\n" " 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); diff --git a/misc/tune2fs.c b/misc/tune2fs.c index df3c0cbc..70bc75ee 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -260,7 +260,7 @@ static int release_blocks_proc(ext2_filsys fs, blk_t *blocknr, 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); diff --git a/resize/resize2fs.c b/resize/resize2fs.c index 76aa51f8..b1e1e47b 100644 --- a/resize/resize2fs.c +++ b/resize/resize2fs.c @@ -810,7 +810,7 @@ static errcode_t blocks_to_move(ext2_resize_t rfs) */ 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)) { |