X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=e2fsck%2Fpass4.c;h=40bc20be02c2a4148ffabbd718019314e9c6eff7;hb=109624a133f147b13903f59d585b20446a3c538f;hp=264b1c7833c31e9825d01cbfa3c061a52672568d;hpb=5596defa1e212242c1bf1b028139143fbb7777a0;p=tools%2Fe2fsprogs.git diff --git a/e2fsck/pass4.c b/e2fsck/pass4.c index 264b1c7..40bc20b 100644 --- a/e2fsck/pass4.c +++ b/e2fsck/pass4.c @@ -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 }