diff mbox series

[RFCv1,64/72] e2fsck: propagate number of threads

Message ID 538c698d8259613f69d46ae29847ac256778e135.1667822612.git.ritesh.list@gmail.com
State Under Review
Delegated to: Theodore Ts'o
Headers show
Series e2fsprogs: Parallel fsck support | expand

Commit Message

Ritesh Harjani (IBM) Nov. 7, 2022, 12:21 p.m. UTC
From: Saranya Muruganandam <saranyamohan@google.com>

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: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
 e2fsck/unix.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series


diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 461ab8cb..fb0df85a 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1745,6 +1745,9 @@  failure:
 	ctx->fs = fs;
 	fs->now = ctx->now;
+	fs->fs_num_threads = ctx->pfs_num_threads;
 	sb = fs->super;
 	if (sb->s_rev_level > E2FSCK_CURRENT_REV) {