aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaranya Muruganandam <saranyamohan@google.com>2020-11-13 15:33:05 -0800
committerTheodore Ts'o <tytso@mit.edu>2021-01-25 15:19:11 -0500
commit3f56676f4daa7379dbd868a4114910f20d49527d (patch)
treecd0fcfff78f663849869e75508e3ffb032f5fec5
parentafad25acf8c6694c8cea08820fe5af84388a76f3 (diff)
downloade2fsprogs-3f56676f4daa7379dbd868a4114910f20d49527d.tar.gz
e2fsck: propagate number of threads
Sometimes, such as in orphan_inode case, e2fsck_pass1 is called after reading the block bitmaps. This results in reading the block bitmap sequentially and multithreading only gets kicked in later. Fix the thread count earlier while setting up the file system. Signed-off-by: Saranya Muruganandam <saranyamohan@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--e2fsck/unix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 1e894db73..757fdb221 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1730,6 +1730,9 @@ failure:
ctx->fs = fs;
fs->now = ctx->now;
+#ifdef HAVE_PTHREAD
+ fs->fs_num_threads = ctx->pfs_num_threads;
+#endif
sb = fs->super;
if (sb->s_rev_level > E2FSCK_CURRENT_REV) {