]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2fsck: propagate number of threads
authorSaranya Muruganandam <saranyamohan@google.com>
Fri, 13 Nov 2020 23:33:05 +0000 (15:33 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 25 Jan 2021 20:19:11 +0000 (15:19 -0500)
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>
e2fsck/unix.c

index 1e894db7383be367cdbe24b6006a10a34fbc2195..757fdb221e7e726c40019037e318d2f9e1d97837 100644 (file)
@@ -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) {