[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201118153947.3394530-38-saranyamohan@google.com>
Date: Wed, 18 Nov 2020 07:39:23 -0800
From: Saranya Muruganandam <saranyamohan@...gle.com>
To: linux-ext4@...r.kernel.org, tytso@....edu
Cc: adilger.kernel@...ger.ca, Wang Shilong <wshilong@....com>,
Saranya Muruganandam <saranyamohan@...gle.com>
Subject: [RFC PATCH v3 37/61] e2fsck: merge options after threads finish
From: Wang Shilong <wshilong@....com>
It will be possible that threads might append E2F_OPT_YES,
so we need merge options to global, test f_yesall cover this.
Signed-off-by: Wang Shilong <wshilong@....com>
Signed-off-by: Saranya Muruganandam <saranyamohan@...gle.com>
---
e2fsck/pass1.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index ad3bd8be..1a68a2fb 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -2935,6 +2935,7 @@ static int e2fsck_pass1_thread_join_one(e2fsck_t global_ctx, e2fsck_t thread_ctx
ext2_refcount_t ea_inode_refs = global_ctx->ea_inode_refs;
ext2fs_block_bitmap block_found_map = global_ctx->block_found_map;
ext2fs_block_bitmap block_dup_map = global_ctx->block_dup_map;
+ int options = global_ctx->options;
#ifdef HAVE_SETJMP_H
jmp_buf old_jmp;
@@ -2987,7 +2988,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);
@@ -3022,10 +3024,7 @@ static int e2fsck_pass1_thread_join_one(e2fsck_t global_ctx, e2fsck_t thread_ctx
thread_ctx->qctx);
if (retval)
return retval;
- global_ctx->invalid_block_bitmap_flag = invalid_block_bitmap_flag;
- global_ctx->invalid_inode_bitmap_flag = invalid_inode_bitmap_flag;
- global_ctx->invalid_inode_table_flag = invalid_inode_table_flag;
- global_ctx->invalid_bitmaps = invalid_bitmaps;
+
e2fsck_pass1_merge_invalid_bitmaps(global_ctx, thread_ctx);
retval = e2fsck_pass1_merge_bitmap(global_fs,
--
2.29.2.299.gdc1121823c-goog
Powered by blists - more mailing lists