All fsck threads will call for log_out prints after the pass1 their respective pass1 scanning is completed. This patch moves the log_out print from to after the pthread_join operation. This makes the threads always print the info in order. Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@xxxxxxxxx> --- e2fsck/pass1.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 2ff83fcb..90adc419 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -3112,6 +3112,12 @@ static int e2fsck_pass1_thread_join(e2fsck_t global_ctx, e2fsck_t thread_ctx) { errcode_t retval; + log_out(thread_ctx, + _("Scanned group range [%u, %u), inodes %u\n"), + thread_ctx->thread_info.et_group_start, + thread_ctx->thread_info.et_group_end, + thread_ctx->thread_info.et_inode_number); + retval = e2fsck_pass1_merge_context(global_ctx, thread_ctx); quota_release_context(&thread_ctx->qctx); @@ -3203,13 +3209,6 @@ static void *e2fsck_pass1_thread(void *arg) e2fsck_pass1_run(thread_ctx); out: - if (thread_ctx->options & E2F_OPT_MULTITHREAD) - log_out(thread_ctx, - _("Scanned group range [%u, %u), inodes %u\n"), - thread_ctx->thread_info.et_group_start, - thread_ctx->thread_info.et_group_end, - thread_ctx->thread_info.et_inode_number); - #ifdef DEBUG_THREADS pthread_mutex_lock(&thread_debug->etd_mutex); thread_debug->etd_finished_threads++; -- 2.37.3