Whamcloud - gitweb
Merge branch 'maint' into next
[tools/e2fsprogs.git] / e2fsck / pass5.c
index 346c831..498c041 100644 (file)
@@ -270,7 +270,7 @@ static void e2fsck_discard_inodes(e2fsck_t ctx, dgrp_t group,
 
 #define NO_BLK ((blk64_t) -1)
 
-static void print_bitmap_problem(e2fsck_t ctx, int problem,
+static void print_bitmap_problem(e2fsck_t ctx, problem_t problem,
                            struct problem_context *pctx)
 {
        switch (problem) {
@@ -315,14 +315,15 @@ static void check_block_bitmaps(e2fsck_t ctx)
        ext2_filsys fs = ctx->fs;
        blk64_t i;
        unsigned int    *free_array;
-       int     group = 0;
+       dgrp_t          g, group = 0;
        unsigned int    blocks = 0;
        blk64_t free_blocks = 0;
        blk64_t first_free = ext2fs_blocks_count(fs->super);
        unsigned int    group_free = 0;
        int     actual, bitmap;
        struct problem_context  pctx;
-       int     problem, save_problem, fixit, had_problem;
+       problem_t       problem, save_problem;
+       int             fixit, had_problem;
        errcode_t       retval;
        int             csum_flag;
        int             skip_group = 0;
@@ -615,15 +616,15 @@ redo_counts:
        } else if (fixit == 0)
                ext2fs_unmark_valid(fs);
 
-       for (i = 0; i < fs->group_desc_count; i++) {
-               if (free_array[i] != ext2fs_bg_free_blocks_count(fs, i)) {
-                       pctx.group = i;
-                       pctx.blk = ext2fs_bg_free_blocks_count(fs, i);
-                       pctx.blk2 = free_array[i];
+       for (g = 0; g < fs->group_desc_count; g++) {
+               if (free_array[g] != ext2fs_bg_free_blocks_count(fs, g)) {
+                       pctx.group = g;
+                       pctx.blk = ext2fs_bg_free_blocks_count(fs, g);
+                       pctx.blk2 = free_array[g];
 
                        if (fix_problem(ctx, PR_5_FREE_BLOCK_COUNT_GROUP,
                                        &pctx)) {
-                               ext2fs_bg_free_blocks_count_set(fs, i, free_array[i]);
+                               ext2fs_bg_free_blocks_count_set(fs, g, free_array[g]);
                                ext2fs_mark_super_dirty(fs);
                        } else
                                ext2fs_unmark_valid(fs);
@@ -653,14 +654,15 @@ static void check_inode_bitmaps(e2fsck_t ctx)
        unsigned int    free_inodes = 0;
        int             group_free = 0;
        int             dirs_count = 0;
-       int             group = 0;
+       dgrp_t          group = 0;
        unsigned int    inodes = 0;
        ext2_ino_t      *free_array;
        ext2_ino_t      *dir_array;
        int             actual, bitmap;
        errcode_t       retval;
        struct problem_context  pctx;
-       int             problem, save_problem, fixit, had_problem;
+       problem_t       problem, save_problem;
+       int             fixit, had_problem;
        int             csum_flag;
        int             skip_group = 0;
        int             redo_flag = 0;