diff options
author | Theodore Ts'o <tytso@mit.edu> | 1998-05-07 05:02:00 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 1998-05-07 05:02:00 +0000 |
commit | efac9a1b8d87d753b1c7989d9c05979c3c9c1a53 (patch) | |
tree | 40f9733cdc00194ee320ee9deef34b5ea2b77351 /e2fsck/pass5.c | |
parent | 353952d15773b4ebb0096b535eea0d8e25828498 (diff) | |
download | e2fsprogs-efac9a1b8d87d753b1c7989d9c05979c3c9c1a53.tar.gz |
ChangeLog, e2fsck.8.in, e2fsck.h, pass5.c, unix.c:
unix.c (PRS): Added new option -C, which causes e2fsck to print
progress updates so that callers can keep track of the completion
progress of e2fsck. Designed for use by progress, except for -C 0,
which prints a spinning report which may be useful for some users.
pass5.c (e2fsck_pass5): Use a finer-grained progress reporting scheme
(useful for larger filesystems).
e2fsck.h: Add progress_fd and progress_pos, for use by the Unix
progress reporting functions.
Diffstat (limited to 'e2fsck/pass5.c')
-rw-r--r-- | e2fsck/pass5.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c index 7561e792..0dccb023 100644 --- a/e2fsck/pass5.c +++ b/e2fsck/pass5.c @@ -39,15 +39,11 @@ void e2fsck_pass5(e2fsck_t ctx) fix_problem(ctx, PR_5_PASS_HEADER, &pctx); if (ctx->progress) - if ((ctx->progress)(ctx, 5, 0, 3)) + if ((ctx->progress)(ctx, 5, 0, ctx->fs->group_desc_count*2)) return; e2fsck_read_bitmaps(ctx); - if (ctx->progress) - if ((ctx->progress)(ctx, 5, 2, 3)) - return; - check_block_bitmaps(ctx); if (ctx->flags & E2F_FLAG_SIGNAL_MASK) return; @@ -61,10 +57,6 @@ void e2fsck_pass5(e2fsck_t ctx) if (ctx->flags & E2F_FLAG_SIGNAL_MASK) return; - if (ctx->progress) - if ((ctx->progress)(ctx, 5, 3, 3)) - return; - ext2fs_free_inode_bitmap(ctx->inode_used_map); ctx->inode_used_map = 0; ext2fs_free_inode_bitmap(ctx->inode_dir_map); @@ -164,6 +156,10 @@ redo_counts: group ++; blocks = 0; group_free = 0; + if (ctx->progress) + if ((ctx->progress)(ctx, 5, group, + fs->group_desc_count*2)) + return; } } if (had_problem) @@ -305,6 +301,11 @@ do_counts: inodes = 0; group_free = 0; dirs_count = 0; + if (ctx->progress) + if ((ctx->progress)(ctx, 5, + group + fs->group_desc_count, + fs->group_desc_count*2)) + return; } } if (had_problem) |