Whamcloud - gitweb
Update for 1.24 release.
[tools/e2fsprogs.git] / e2fsck / pass4.c
index 264b1c7..40bc20b 100644 (file)
@@ -10,6 +10,7 @@
  *
  * Pass 4 frees the following data structures:
  *     - A bitmap of which inodes are in bad blocks.   (inode_bb_map)
+ *     - A bitmap of which inodes are imagic inodes.   (inode_imagic_map)
  */
 
 #include "e2fsck.h"
@@ -22,7 +23,7 @@
  * This subroutine returns 1 then the caller shouldn't bother with the
  * rest of the pass 4 tests.
  */
-static int disconnect_inode(e2fsck_t ctx, ino_t i)
+static int disconnect_inode(e2fsck_t ctx, ext2_ino_t i)
 {
        ext2_filsys fs = ctx->fs;
        struct ext2_inode       inode;
@@ -78,7 +79,7 @@ static int disconnect_inode(e2fsck_t ctx, ino_t i)
 void e2fsck_pass4(e2fsck_t ctx)
 {
        ext2_filsys fs = ctx->fs;
-       ino_t   i;
+       ext2_ino_t      i;
        struct ext2_inode       inode;
 #ifdef RESOURCE_TRACK
        struct resource_track   rtrack;
@@ -117,6 +118,8 @@ void e2fsck_pass4(e2fsck_t ctx)
                    (i > EXT2_ROOT_INO && i < EXT2_FIRST_INODE(fs->super)))
                        continue;
                if (!(ext2fs_test_inode_bitmap(ctx->inode_used_map, i)) ||
+                   (ctx->inode_imagic_map &&
+                    ext2fs_test_inode_bitmap(ctx->inode_imagic_map, i)) ||
                    (ctx->inode_bb_map &&
                     ext2fs_test_inode_bitmap(ctx->inode_bb_map, i)))
                        continue;
@@ -152,10 +155,12 @@ void e2fsck_pass4(e2fsck_t ctx)
        ext2fs_free_icount(ctx->inode_count); ctx->inode_count = 0;
        ext2fs_free_inode_bitmap(ctx->inode_bb_map);
        ctx->inode_bb_map = 0;
+       ext2fs_free_inode_bitmap(ctx->inode_imagic_map);
+       ctx->inode_imagic_map = 0;
 #ifdef RESOURCE_TRACK
        if (ctx->options & E2F_OPT_TIME2) {
                e2fsck_clear_progbar(ctx);
-               print_resource_track("Pass 4", &rtrack);
+               print_resource_track(_("Pass 4"), &rtrack);
        }
 #endif
 }