]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Convert ext2fs_group_of_blk() to ext2fs_group_of_blk2()
authorTheodore Ts'o <tytso@mit.edu>
Mon, 26 Oct 2009 00:50:15 +0000 (20:50 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 26 Oct 2009 00:50:15 +0000 (20:50 -0400)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/alloc_tables.c
lib/ext2fs/mkjournal.c
misc/mke2fs.c
misc/tune2fs.c
resize/resize2fs.c

index 696829f02d93a738289c14e2d22f2ee715250d81..e104abc4979cc165f65eed2c4574419a485007b2 100644 (file)
@@ -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,
index 8d5bf01d13b4bb7a5cb61f3fba7034d2dda007d3..6afbbde358086f47f73653da767593cc89e48bfa 100644 (file)
@@ -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)) {
index 4fb6dfe4cc867fb68b43d60f94bf7401f364dcc4..155936857df0a190da80c8a356e45a5ca417bf34 100644 (file)
@@ -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);
index df3c0cbcbb6d12bc2ff0ef32c8e8dbccfa946298..70bc75eea352f8717d3643dfd6d32854735b4558 100644 (file)
@@ -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);
index 76aa51f891b40b1507a5e00690c32e25340d7cd4..b1e1e47b1710df584709839b16d677a294d0c228 100644 (file)
@@ -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)) {