[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201118153947.3394530-56-saranyamohan@google.com>
Date: Wed, 18 Nov 2020 07:39:41 -0800
From: Saranya Muruganandam <saranyamohan@...gle.com>
To: linux-ext4@...r.kernel.org, tytso@....edu
Cc: adilger.kernel@...ger.ca, Wang Shilong <wshilong@....com>,
Saranya Muruganandam <saranyamohan@...gle.com>
Subject: [RFC PATCH v3 55/61] e2fsck: fix readahead for pass1 without pfsck
From: Wang Shilong <wshilong@....com>
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@....com>
Signed-off-by: Saranya Muruganandam <saranyamohan@...gle.com>
---
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
Powered by blists - more mailing lists