diff options
| author | Ken Chen <kenchen@google.com> | 2009-05-04 20:12:30 -0700 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2009-05-28 09:37:16 -0400 |
| commit | fea390e2534907dad42159437e01bd9a4ead2c55 (patch) | |
| tree | 2f13a2ae3cabef0bf4683b7bcd33d57d99356fa6 | |
| parent | 312c2a404c1af85b88b855687b6a30cd24ca9e34 (diff) | |
| download | android_external_e2fsprogs-fea390e2534907dad42159437e01bd9a4ead2c55.tar.gz android_external_e2fsprogs-fea390e2534907dad42159437e01bd9a4ead2c55.tar.bz2 android_external_e2fsprogs-fea390e2534907dad42159437e01bd9a4ead2c55.zip | |
e2fsck: add resource tracking for passes 1[b-d]
On ext2, time tracking for pass1 includes both error detection and
specific type of fs fix-up phase (e.g. block referenced by multiple
inodes). The multi-reference fix-up phase some time take significant
amount of time to complete. We would like to track time spent in sub
component of pass1 by having a finer granularity during pass1b through
pass1d phase.
Signed-off-by: Ken Chen <kenchen@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| -rw-r--r-- | e2fsck/pass1b.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/e2fsck/pass1b.c b/e2fsck/pass1b.c index 809bd7f7..008d0793 100644 --- a/e2fsck/pass1b.c +++ b/e2fsck/pass1b.c @@ -208,6 +208,9 @@ void e2fsck_pass1_dupblocks(e2fsck_t ctx, char *block_buf) { ext2_filsys fs = ctx->fs; struct problem_context pctx; +#ifdef RESOURCE_TRACK + struct resource_track rtrack; +#endif clear_problem_context(&pctx); @@ -224,10 +227,39 @@ void e2fsck_pass1_dupblocks(e2fsck_t ctx, char *block_buf) dict_set_allocator(&ino_dict, NULL, inode_dnode_free, NULL); dict_set_allocator(&blk_dict, NULL, block_dnode_free, NULL); +#ifdef RESOURCE_TRACK + init_resource_track(&rtrack, ctx->fs->io); +#endif + pass1b(ctx, block_buf); + +#ifdef RESOURCE_TRACK + if (ctx->options & E2F_OPT_TIME2) { + e2fsck_clear_progbar(ctx); + print_resource_track("Pass 1b", &rtrack, ctx->fs->io); + } + init_resource_track(&rtrack, ctx->fs->io); +#endif + pass1c(ctx, block_buf); + +#ifdef RESOURCE_TRACK + if (ctx->options & E2F_OPT_TIME2) { + e2fsck_clear_progbar(ctx); + print_resource_track("Pass 1c", &rtrack, ctx->fs->io); + } + init_resource_track(&rtrack, ctx->fs->io); +#endif + pass1d(ctx, block_buf); +#ifdef RESOURCE_TRACK + if (ctx->options & E2F_OPT_TIME2) { + e2fsck_clear_progbar(ctx); + print_resource_track("Pass 1d", &rtrack, ctx->fs->io); + } +#endif + /* * Time to free all of the accumulated data structures that we * don't need anymore. |
