From: Wang Shilong <wshilong@xxxxxxx> 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@xxxxxxx> Signed-off-by: Saranya Muruganandam <saranyamohan@xxxxxxxxxx> --- e2fsck/pass1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 3899d710..70826866 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -1100,7 +1100,8 @@ static void pass1_readahead(e2fsck_t ctx, dgrp_t *group, ext2_ino_t *next_ino) 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; -- 2.29.2.299.gdc1121823c-goog