diff options
author | Theodore Ts'o <tytso@mit.edu> | 2011-12-16 14:55:50 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-12-18 01:12:44 -0500 |
commit | 830b44f4385eb255d08fe0c8b200f8d8e3e97a8d (patch) | |
tree | c00e638c1c54b0f41040a178d7080725c26525ec /e2fsck/pass3.c | |
parent | 0ff7bf30074d8a449ba389e9f088d356447105de (diff) | |
download | e2fsprogs-830b44f4385eb255d08fe0c8b200f8d8e3e97a8d.tar.gz |
e2fsck: use different bitmap types as appropriate
Now that we have multiple backend implementations of the bitmap code,
this commit teaches e2fsck to use either the most appropriate backend
for each use case.
Since we don't know for sure if we will get it all right, the default
choices can be overridden via e2fsck.conf. The various definitions
are shown here, with the current defaults (which may change as we add
more bitmap implementations and as learn what works better).
; EXT2FS_BAMP64_BITARRAY is 1
; EXT2FS_BMAP64_RBTREE is 2
; EXT2FS_BMAP64_AUTODIR is 3
[bitmaps]
inode_used_map = 2 ; pass1
inode_dir_map = 3 ; pass1
inode_reg_map = 2 ; pass1
block_found_map = 2 ; pass1
inode_bad_map = 2 ; pass1
inode_imagic_map = 2 ; pass1
block_dup_map = 2 ; pass1
block_ea_map = 2 ; pass1
inode_link_info = 2 ; pass1
inode_dup_map = 2 ; pass1b
inode_done_map = 3 ; pass3
inode_loop_detect = 3 ; pass3
fs_bitmaps = 2
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'e2fsck/pass3.c')
-rw-r--r-- | e2fsck/pass3.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/e2fsck/pass3.c b/e2fsck/pass3.c index 7164aa99..565b8e33 100644 --- a/e2fsck/pass3.c +++ b/e2fsck/pass3.c @@ -74,8 +74,9 @@ void e2fsck_pass3(e2fsck_t ctx) /* * Allocate some bitmaps to do loop detection. */ - pctx.errcode = ext2fs_allocate_inode_bitmap(fs, _("inode done bitmap"), - &inode_done_map); + pctx.errcode = e2fsck_allocate_inode_bitmap(fs, _("inode done bitmap"), + EXT2FS_BMAP64_AUTODIR, + "inode_done_map", &inode_done_map); if (pctx.errcode) { pctx.num = 2; fix_problem(ctx, PR_3_ALLOCATE_IBITMAP_ERROR, &pctx); @@ -318,7 +319,7 @@ static int check_directory(e2fsck_t ctx, ext2_ino_t dir, if (inode_loop_detect) ext2fs_clear_inode_bitmap(inode_loop_detect); else { - pctx->errcode = ext2fs_allocate_inode_bitmap(fs, _("inode loop detection bitmap"), &inode_loop_detect); + pctx->errcode = e2fsck_allocate_inode_bitmap(fs, _("inode loop detection bitmap"), EXT2FS_BMAP64_AUTODIR, "inode_loop_detect", &inode_loop_detect); if (pctx->errcode) { pctx->num = 1; fix_problem(ctx, |