Whamcloud - gitweb
LU-8465 e2fsck: merge options after threads finish 98/37998/10
authorWang Shilong <wshilong@ddn.com>
Thu, 19 Mar 2020 14:05:30 +0000 (22:05 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 26 Sep 2020 06:36:10 +0000 (06:36 +0000)
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 <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/37998
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
e2fsck/pass1.c

index f20cf00..43c80e4 100644 (file)
@@ -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);