If admin try fsck without -m option, codes try old
behavior, thread information won't be inited either.
@et_group_end is 0 thus readahead for pass1 will be
totally disabled.
With the patch applied, we could get same performance
number without pfsck as before.
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I3f6158937fb83490243f34693f631a2d7a8f9e4c
Reviewed-on: https://review.whamcloud.com/40066
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
errcode_t err = EXT2_ET_INVALID_ARGUMENT;
#ifdef CONFIG_PFSCK
- grp_end = ctx->thread_info.et_group_end;
+ if (ctx->fs->fs_num_threads > 1)
+ grp_end = ctx->thread_info.et_group_end;
#endif
if (ctx->readahead_kb == 0)
goto out;