Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp414545pxb; Wed, 18 Nov 2020 07:43:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLOgoqXj7aMCSrhLVu2LpLpfrwweCN1N8Uj2MLucJSIvUWRVmw/OV28kN0clCXYjRbZLfT X-Received: by 2002:aa7:d407:: with SMTP id z7mr27136609edq.234.1605714206560; Wed, 18 Nov 2020 07:43:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605714206; cv=none; d=google.com; s=arc-20160816; b=uAQ3Vvhl72BzXg9DoE1qUx9d0Nkh1lF4bB+M3FmFIjcJNRNEyQ6TklctN1u8tHUcG5 UJ8Mtub2e+Qe7eCD+iiCcIznGTtKG73d8uNi4hx34nk8HwWzQWIBthiYbfnovYOLbwdY H1UfoZtOPUg1uJGwGfh2rii8NXKchHp8V0pAoNdRsTJcFCirMOATauBrQbq8DOs9X0XN CKcEfLqnDqTK4ovc22SDnCqTPKub0MCrzUT4xiamtrtk//JTgtGyglbt4eqEZYHxuUWU 5S7Zx+GwuE6gw2Vb6ILk6KFuoovqHPbrwDsKu2rMiRaOabyMAsPwqhnj51pVxY5zI9E6 f/lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=6e3QHpxWYS5pREffVmkDbMng1wHtMagVt6U7jho/w5M=; b=Xqsstoct1O2LaqYmvjYezTVCssZHU/gOwXyzqztfnCj+l0zXSz83rDINHuZSirVJdl aCWZac12n1T5Zw5PlFLIsifiBs4aI7zpVO+nrHHrcRfgCk6tjHo24cu+FGvdP/kgfXlE bCgVKSmdN1ZoT6ZoFW63HoxBIbdLbX5HvAxaxaZpAZw2/L+tjiI1FLjKxReNs+0VzRZy psVtCv7NfTCTn/zD893qr8WElU6tqQnnAd4qz+Vnq5LXk45VK4dKAl8AYrHJOnPzqEis piuaVTPSmTcq8mj4SeTYTNHv6wsEHnXkckPyp0cdn90Gn4q4q5H9LOvFBs/hlgS9GD6w m9kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=AjQEOCJV; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h7si7062856ejt.22.2020.11.18.07.43.03; Wed, 18 Nov 2020 07:43:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=AjQEOCJV; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725772AbgKRPlg (ORCPT + 99 others); Wed, 18 Nov 2020 10:41:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727438AbgKRPlf (ORCPT ); Wed, 18 Nov 2020 10:41:35 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EDB8C0613D4 for ; Wed, 18 Nov 2020 07:41:35 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id z29so2885179ybi.23 for ; Wed, 18 Nov 2020 07:41:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=6e3QHpxWYS5pREffVmkDbMng1wHtMagVt6U7jho/w5M=; b=AjQEOCJVRTZHcPDd3WEh0lncuncx1Mngl6692ZuxuZzC2FIocCQnbvVasczjQ9y5P4 BMyJbitPUuKWv6Eekzu6+qJhjmPW0u59qrjlRw1OW9rN2vwlcNX4QWcYw+oT2oLF6RDD 6obH1sgpnB/Fa7mzQTbbc5CwTOdsCFDXp0cjg86J4nCb38meiT/0QN4rKVeyWcGwA0fg LES7c1wNP3+T34p7OfbeJmL59Z/FL0dou+o+T5o7AB8cwECrf5RMdBtmoHBVxuUzoQDv BCZ1u0vVql9BN4TqxWtNQSwfBR3e/9r9mKeNwboFsQD7mMDP7aSJ0Hj7dDR83EFJmgCl k4Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=6e3QHpxWYS5pREffVmkDbMng1wHtMagVt6U7jho/w5M=; b=pI6e85AvMMM5ONYOkpiv/iDD46g7vRDWbzS+/cScB4MZIYhlGubY7IBqevZzjau03M nU2UvG3Vd/g5WK3wDCJATOSYEHoRPdQBgmkAxcFucKY3HhKrwNVqqLsDPKCEXZKD2qYZ tbE4Yhad5To39VXdmd7GyXxerqsGoGBkDZ8aXNvQNCvY62aFJ5ttyfWaM8P6gTh/eOc1 lmmUJvYtdTMZNl9/QWLJRQqy6y55TgOHiVUmR8LZCtffAo1qq7NfkEKGaNKf5j2BYzDg 6MqmWSZwNYoenor1ajcxSxp6Lp3rSVbkDp0DBiRNwr6mTwlka4dWCCQZKFC9UhUgi3UL P4VQ== X-Gm-Message-State: AOAM533TMaP9MOa2bLJ4muQfkdz4ky3aGIwd0VIoG7KCVbwLKtK57p6w zvH/0cYx23yv18seE/wnitn9Exup6fMIsjL0nl8miRw6zh4td+E1raZ7HJS1dpYZ/PxSt0b1aap D49/VVIh02pDm89hvMezsMvXj8OiAlCoIsUq4ziNkIjTrr41a6EmUPZ3zTk/jAlYKtTuBMBk0jV TtsBEeg/0= Sender: "saranyamohan via sendgmr" X-Received: from saranyamohan.svl.corp.google.com ([100.116.76.178]) (user=saranyamohan job=sendgmr) by 2002:a25:7e42:: with SMTP id z63mr8602623ybc.63.1605714094707; Wed, 18 Nov 2020 07:41:34 -0800 (PST) Date: Wed, 18 Nov 2020 07:39:23 -0800 In-Reply-To: <20201118153947.3394530-1-saranyamohan@google.com> Message-Id: <20201118153947.3394530-38-saranyamohan@google.com> Mime-Version: 1.0 References: <20201118153947.3394530-1-saranyamohan@google.com> X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [RFC PATCH v3 37/61] e2fsck: merge options after threads finish From: Saranya Muruganandam To: linux-ext4@vger.kernel.org, tytso@mit.edu Cc: adilger.kernel@dilger.ca, Wang Shilong , Saranya Muruganandam Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Wang Shilong 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 Signed-off-by: Saranya Muruganandam --- 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