diff options
author | Theodore Ts'o <tytso@mit.edu> | 2007-04-06 18:43:11 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2007-04-06 18:43:11 -0400 |
commit | 34b9f7963933daeb1c3fb3f21a70a1673d098154 (patch) | |
tree | fc99da2f09e30a370cfcbc88ad29246bfa92c679 /e2fsck/pass2.c | |
parent | 1b9d8cb7057387afae106ffa662613205f07e131 (diff) | |
download | e2fsprogs-34b9f7963933daeb1c3fb3f21a70a1673d098154.tar.gz |
Enable e2fsck to use the tdb library for the inode count abstraction
If e2fsck.conf configures a scratch_files directory which is available,
and the number of directories exceeds scratch_files.numdirs_threshold,
then try to use the tdb library to store the inode count abstraction.
This allows us to check very large filesystems without needing as much
physical memory.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'e2fsck/pass2.c')
-rw-r--r-- | e2fsck/pass2.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c index e4479308..715919d6 100644 --- a/e2fsck/pass2.c +++ b/e2fsck/pass2.c @@ -114,7 +114,13 @@ void e2fsck_pass2(e2fsck_t ctx) if (!(ctx->options & E2F_OPT_PREEN)) fix_problem(ctx, PR_2_PASS_HEADER, &cd.pctx); - cd.pctx.errcode = ext2fs_create_icount2(fs, EXT2_ICOUNT_OPT_INCREMENT, + e2fsck_setup_tdb_icount(ctx, EXT2_ICOUNT_OPT_INCREMENT, + &ctx->inode_count); + if (ctx->inode_count) + cd.pctx.errcode = 0; + else + cd.pctx.errcode = ext2fs_create_icount2(fs, + EXT2_ICOUNT_OPT_INCREMENT, 0, ctx->inode_link_info, &ctx->inode_count); if (cd.pctx.errcode) { |