From: Saranya Muruganandam Date: Fri, 13 Nov 2020 23:33:05 +0000 (-0800) Subject: e2fsck: propagate number of threads X-Git-Tag: v1.47.1-wc1~46 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0b4588d237e89f1692d5649bd43ec9dc0c7a86c2;p=tools%2Fe2fsprogs.git 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. E2fsprogs-commit: 3f56676f4daa7379dbd868a4114910f20d49527d Change-Id: I51ab36ad8094c605a32e4b7929fadb326d77169e Signed-off-by: Saranya Muruganandam Signed-off-by: Theodore Ts'o --- diff --git a/e2fsck/unix.c b/e2fsck/unix.c index 0d382dd..5a29da7 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -1749,6 +1749,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) {