Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp854191iog; Fri, 17 Jun 2022 15:34:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1srH+rFbB4dowuGT3zN7ceuWwTxosDDq5Z7LfaIvnHYOINwgAa06n3P62MIxqzuPMStvSp8 X-Received: by 2002:a17:906:1d4:b0:712:c0a:5683 with SMTP id 20-20020a17090601d400b007120c0a5683mr11075291ejj.211.1655505283516; Fri, 17 Jun 2022 15:34:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655505283; cv=none; d=google.com; s=arc-20160816; b=hTXoyl9yU2wcZOdEoelWLQqeJJDxJCDhu0YJ5hWPCC302fiVo2TjHeU2lx0MeOMXAk F/kSgxC3dnC5YSuu/oSh9tIS9abgNeGtB4UmZZBsa8DDX3XmOIFUZqh483bBeftU7YgZ T184FjOef3I7/8mwtckwUH8w3QJilSYU9uFBLiiRwUf6hMLephv/H9pI4PTDZBrB27JY plV5dNpVRz8gvBe1DBfkXXyig22RFI+ZWiCqc0DW650wq3xB0l5uZBbHnTpFJ0fOHgKW 3E6OGXq84oahgoJNl5Ms+1jB+5OpAXAbihBIhGPdbBhiJxJmZneie5+j3nMo65Rk5dCt I3dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g6jDrd/6P/XcaDPAT2QLNOvaLy3WnE7N8GNIORYt2rE=; b=mcy97AD2MULh3CuHKMoslbmhbLSGBodg3R2lnaeSVwg5D+xEJa7VPfqEN1GD+qCpXT YZQQqvucRLoydcislexLbplebYAMYzqElP2SmNF2UwFhpxpHF8sZz1r8ePMcIivfAdIf i7691TQxlP/ZOUQuhfQNofFaXp6Cz6gKJUCj6liAqbsqymZ1C023RD/WHZt+9SHBI6iw FUzFMbiWt0yatQ9zQRzoNkujXDZ9RqZrHxMojawJ/LG6Qxgk30TA0QpCTujTGc6sGzLo RWpOxmqTUAh5Go/fWtVq2uiTov+wml/Rju7NynrRZdH8zx+5JRwJZLjPPt/4tndoCz31 7s3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="RIXPSr8/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd22-20020a170906ce3600b006f3ce72ceb7si1978293ejb.531.2022.06.17.15.34.18; Fri, 17 Jun 2022 15:34:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="RIXPSr8/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346341AbiFQWbk (ORCPT + 99 others); Fri, 17 Jun 2022 18:31:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237860AbiFQWbc (ORCPT ); Fri, 17 Jun 2022 18:31:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 480FA62225 for ; Fri, 17 Jun 2022 15:31:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D94D7B82A33 for ; Fri, 17 Jun 2022 22:31:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7747BC3411D; Fri, 17 Jun 2022 22:31:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655505088; bh=5Fok1MzW22buXw55Kbx09DXpCWfLARQYnQkHsxPjVgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RIXPSr8/QcfEZ1emcqB4Hnk6NDOOenE6LPPApd5hObqqpIADJnvMH4tbKGbfYSbS5 2yJ82RFPDkY7CayPZaf/mGleS7xkj8Yrv726HU+vG/yoOqJgaIsgkENBahhMcAYAqf qKDFP6CdZjJBKOAQAlUkKzIIozRRu/bn1GfuHJx/DohDdltCVgCgg7BDxUPRLAaaF4 LBhxTH55RjNFNXHSAoqM9zW8BKUcFpfZx6w8dnh7jTEo7+Ncakn531PCa75p5Bp8Bk sXydQ9Q1Nwvx8BlouFOp5S0DTTrStzbXbeaR0sYUbuTKxzLu8qb5du9GvoK2JFapam oRqm1qNFx1/gg== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 3/3] f2fs: do not skip updating inode when retrying to flush node page Date: Fri, 17 Jun 2022 15:31:06 -0700 Message-Id: <20220617223106.3517374-3-jaegeuk@kernel.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog In-Reply-To: <20220617223106.3517374-1-jaegeuk@kernel.org> References: <20220617223106.3517374-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Let's try to flush dirty inode again to improve subtle i_blocks mismatch. Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 836c79a20afc..4181d03a7ef7 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1943,7 +1943,6 @@ int f2fs_sync_node_pages(struct f2fs_sb_info *sbi, for (i = 0; i < nr_pages; i++) { struct page *page = pvec.pages[i]; bool submitted = false; - bool may_dirty = true; /* give a priority to WB_SYNC threads */ if (atomic_read(&sbi->wb_sync_req[NODE]) && @@ -1996,11 +1995,8 @@ int f2fs_sync_node_pages(struct f2fs_sb_info *sbi, } /* flush dirty inode */ - if (IS_INODE(page) && may_dirty) { - may_dirty = false; - if (flush_dirty_inode(page)) - goto lock_node; - } + if (IS_INODE(page) && flush_dirty_inode(page)) + goto lock_node; write_node: f2fs_wait_on_page_writeback(page, NODE, true, true); -- 2.36.1.476.g0c4daa206d-goog