Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp413569pxb; Wed, 18 Nov 2020 07:41:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfrqz1qEHzc5t4Fj231c1kKVeBbr8NtRVBluU6TF+CDlEQwSrz0CrXvWcrErBA7XHgxyHw X-Received: by 2002:a17:906:e285:: with SMTP id gg5mr24926615ejb.7.1605714117633; Wed, 18 Nov 2020 07:41:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605714117; cv=none; d=google.com; s=arc-20160816; b=Wbjy1sRIdQ5+9edoKcFflESxRtf7nZjZgUC1OP1oH7H/Gz6QUsNCo1CgNJ5PeJMk3/ q/sDRdYQH0XGtWjylytCnDLqA/jpWHNdCUOmoIzo4uLSwKfItQHImmWME4bFPOmRuBMl RGeUJyIKclpw977x3V45lplQUM3bfT8acgv4Yv2k8rvHpJ+BYDA4CfgKjctQTwGx45S/ BrBBdApgIghlmY5tPDbyVpudI/uxM9CoDA5tlmQnLqxZeIoRnXxo9Hwuxysl9SPxO/4f JUkYFxQH2D4yasbY+Zxel5vV+9bdcFiB3/U4Viv7mWmLrXd6TB96+BWXWcsRnhLlsBkg xmnQ== 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=5raDp+nOWma+/5kc4saNDNxM5weU8Iq0IzEpPV0rCbU=; b=Zu8cAedFTWeFVX02azGFzqkrSNqfx9/L+X0nwRKwRL2WwofBaYPXQu2q6rOl99QMms B5GQy1L5F3buXKrTXMZYoTY9uNOlRbbIsscr9pGkM+Vw+21Mbf0/Vyi11xYs2O+Kpiva useV1Zu8JQ6PdD7+Gpgt1yAYZt0I44XI8x5CaJr1TlVGw0f5PA+Sf+MjHInkDyE/v0JU 6wjTqpR/HC7KQhQGTKp3BZr60CbqYQqElNofhyRmELqxBTdZ5wgARMALuP9VhJiogVoU iWZj/dsaABNqrFa2dc9qDAH1g/JzC0ugYIjmfThS1vOaNoyULi1QIlX1BP/cL0Ehsadj MXOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=n+ZwreDc; 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 ec18si15603027ejb.679.2020.11.18.07.41.34; Wed, 18 Nov 2020 07:41:57 -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=n+ZwreDc; 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 S1727315AbgKRPlL (ORCPT + 99 others); Wed, 18 Nov 2020 10:41:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727437AbgKRPlL (ORCPT ); Wed, 18 Nov 2020 10:41:11 -0500 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27EBFC0613D4 for ; Wed, 18 Nov 2020 07:41:11 -0800 (PST) Received: by mail-pg1-x549.google.com with SMTP id z130so1501275pgz.19 for ; Wed, 18 Nov 2020 07:41:11 -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=5raDp+nOWma+/5kc4saNDNxM5weU8Iq0IzEpPV0rCbU=; b=n+ZwreDcDf1fEeDc7RNipvoTbH22hJ6ILsCqG75zc01N6R0LVo+2kbr+wshEgw+rTm 2LZKwE5lgoYKGgyIGw3JxyRCwqyZs42b/xew4e9odl4Bn8LZhH8tmacrMREMz9hYhbDi 9PrsKd2WznCb/0sCB+s9fgGz5uw7b+VOtJCTrOgQ95EYE4CudbrgzstvmA2z1G4vRdUN 4rSiD1VSgid0wMcK1FGr2lgdCKTuj+odoevd7reFGu5bCUHoeQ94raVV1Y5Ej7IHJt5Y OKd/NcLqtwhCXJdjvUNqVfBqOktqircZuzr/v6yuRrSflfg/H8fRRjKZgdTWAGq3zjox cH8g== 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=5raDp+nOWma+/5kc4saNDNxM5weU8Iq0IzEpPV0rCbU=; b=nPzXCjoWo3sAOtei+yGre0I5QBsR6jvWi9+1mQ1QSggi+X/YUt8SrRLbXxyd7YcBVy UZ56NquxdwYEyn/nPjJKtAn6U/riMMnJ2NQ5XFMWkMzMMy012/HB4lfnEtUTRwOINIM8 spiVOsrf3DHZYf9wFjF5kW6Tf/94X9k96HxSmQxWdvwahpQyQ1AhR9A5Nl4okDW6T1ul Q8xSi5dph/YBWzM7WrQ42DPS62xh25W2EytPmYBpozbse1926CkbMF5FLN9FaspeGKXT sr6HN91IiVK490tK8ryM1pInjhNC9ESnl4vtX+wsyQYCxlX0WkMCwR2hkAa3kCrdtGM+ +Siw== X-Gm-Message-State: AOAM5331Cz3lTSfNVpmiFBv+RVTTnhJrKsCgEfTyys/6AYzTBHijFUjA u4B56HN4oe2loE3GF8EVxZ2n2o+/l/65ECf6Ef5qwzH3Zu75UJNiK0+Rr766dOngZrXOfay+jeZ AVPlOXJt+2p4U1JDORLPSh5GeH9mLEFgRvFkZDkD951R8wbpnWzaorgfTjUSmFTOMZNYDLvGeXo 8M6xQPEWg= Sender: "saranyamohan via sendgmr" X-Received: from saranyamohan.svl.corp.google.com ([100.116.76.178]) (user=saranyamohan job=sendgmr) by 2002:a63:e24:: with SMTP id d36mr8570498pgl.373.1605714070479; Wed, 18 Nov 2020 07:41:10 -0800 (PST) Date: Wed, 18 Nov 2020 07:39:10 -0800 In-Reply-To: <20201118153947.3394530-1-saranyamohan@google.com> Message-Id: <20201118153947.3394530-25-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 24/61] e2fsck: merge fs flags when threads finish From: Saranya Muruganandam To: linux-ext4@vger.kernel.org, tytso@mit.edu Cc: adilger.kernel@dilger.ca, Li Xi , Wang Shilong , Saranya Muruganandam Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Li Xi merge fs flags properly. Signed-off-by: Li Xi Signed-off-by: Wang Shilong Signed-off-by: Saranya Muruganandam --- e2fsck/pass1.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index af0ff724..783e14f0 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -2245,6 +2245,7 @@ static int e2fsck_pass1_merge_fs(ext2_filsys dest, ext2_filsys src) ext2fs_block_bitmap block_map; ext2_badblocks_list badblocks; ext2_dblist dblist; + int flags; dest_io = dest->io; dest_image_io = dest->image_io; @@ -2252,6 +2253,7 @@ static int e2fsck_pass1_merge_fs(ext2_filsys dest, ext2_filsys src) block_map = dest->block_map; badblocks = dest->badblocks; dblist = dest->dblist; + flags = dest->flags; memcpy(dest, src, sizeof(struct struct_ext2_filsys)); dest->io = dest_io; @@ -2263,6 +2265,9 @@ static int e2fsck_pass1_merge_fs(ext2_filsys dest, ext2_filsys src) dest->dblist = dblist; if (dest->dblist) dest->dblist->fs = dest; + dest->flags = src->flags | flags; + if (!(src->flags & EXT2_FLAG_VALID) || !(flags & EXT2_FLAG_VALID)) + ext2fs_unmark_valid(dest); if (src->icache) { ext2fs_free_inode_cache(src->icache); -- 2.29.2.299.gdc1121823c-goog