From 161ab07533b70349de98b889ac1c9b3b38145296 Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Thu, 19 Mar 2020 22:05:30 +0800 Subject: [PATCH] LU-8465 e2fsck: merge options after threads finish It will be possible that threads might append E2F_OPT_YES, so we need merge options to global, test f_yesall cover this. Change-Id: I9c73f39016f09570679c11d744ba701c0e3ad294 Signed-off-by: Wang Shilong Reviewed-on: https://review.whamcloud.com/37998 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- e2fsck/pass1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index f20cf00..43c80e4 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -3209,6 +3209,7 @@ static int e2fsck_pass1_thread_join_one(e2fsck_t global_ctx, e2fsck_t thread_ctx ext2fs_block_bitmap block_found_map = global_ctx->block_found_map; ext2fs_block_bitmap block_dup_map = global_ctx->block_dup_map; ext2_u32_list encrypted_dirs = global_ctx->encrypted_dirs; + int options = global_ctx->options; #ifdef HAVE_SETJMP_H jmp_buf old_jmp; @@ -3262,7 +3263,8 @@ static int e2fsck_pass1_thread_join_one(e2fsck_t global_ctx, e2fsck_t thread_ctx global_ctx->fs_fragmented += fs_fragmented; global_ctx->fs_fragmented_dir += fs_fragmented_dir; global_ctx->large_files += large_files; - + /* threads might enable E2F_OPT_YES */ + global_ctx->options |= options; global_ctx->flags |= flags; retval = e2fsck_pass1_merge_fs(global_fs, thread_fs); -- 1.8.3.1