Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp792944iog; Mon, 13 Jun 2022 13:07:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyj+whKBCDTlBw5lr8JV7fG8r6TxLOQWsWKDwkVylI8qgi7a9VwxKiF+LGppBodQdH6fFfU X-Received: by 2002:a17:903:32c1:b0:166:3f58:c1b3 with SMTP id i1-20020a17090332c100b001663f58c1b3mr794799plr.108.1655150830061; Mon, 13 Jun 2022 13:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655150830; cv=none; d=google.com; s=arc-20160816; b=pcCGvBtUNuTtcTwMgmIoGbbqnH1JHWkdGTdbIICm5S3LqboHaLq6akoqPxlTZwhX5v pnJRQOu74baFIHTsi+qaBZ5sGAp/JCTO1dLSqFuUlv8pX7eCjQDf127YT94pU6It9jrl mIrUmI0VQzwMDkYbKdFV3hApB9so8xXyeDiGygIzjiwzEGgsbOxl3RODww3fSLlgwkDX NDNdY1hS+GgCeSmsHzrmafb2Zu6QY/pWz0m1o+U3MDiqmhG2uFlujimnwbgCL09IuozE jEopDoicwcpVumEG8XsEUKnIIRI1giszucE2DUbcoQ2xIue+/L+KVRmNtjdcr38i8z0j UZng== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=g6jDrd/6P/XcaDPAT2QLNOvaLy3WnE7N8GNIORYt2rE=; b=slVZmrRE/G7ty+8BRRKFBR3fBn2oqzzqgMcZk5durzwlWn/p3FW/oP4i3p71ovwiFT 2BHllxc67MLzxtBZVVd+63O8zSPMyQEkbnM7JaC20/2Cnz8ohUokwAolIWH21uhCAS33 C+bR+zw7hNn4uUnZUttJ6VQjn7nldqMzngW9yE7dhsGXVotjbQlKZBLqngTt65mrNN5u VTUvtY+ufiPFGSrnfUe905WWHdYkN9mraqfWtPFgbunQ7dygIL8Co2rXDJLNkdYLf420 5CIiz39xP7Hk0buQn6fCkO+L3kdQ+Kj9JdR3fAzKjAjd0evGYH8JnV5QsYdSVQWtGDjT bI8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=urm4WeNg; 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 12-20020a17090a034c00b001d97a68ce61si13321915pjf.172.2022.06.13.13.06.57; Mon, 13 Jun 2022 13:07:10 -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=urm4WeNg; 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 S1349177AbiFMTVj (ORCPT + 99 others); Mon, 13 Jun 2022 15:21:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348552AbiFMTVT (ORCPT ); Mon, 13 Jun 2022 15:21:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E6541CB38 for ; Mon, 13 Jun 2022 10:23:08 -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 dfw.source.kernel.org (Postfix) with ESMTPS id D592060C26 for ; Mon, 13 Jun 2022 17:23:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32C84C34114; Mon, 13 Jun 2022 17:23:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655140987; bh=5Fok1MzW22buXw55Kbx09DXpCWfLARQYnQkHsxPjVgU=; h=From:To:Cc:Subject:Date:From; b=urm4WeNgQD64HPL+w0eL+IFtNJBWXZsbwagXOmHVMF4xq/DGrjJSTCR9H6XxUF/WZ rt6jpXhESVwWsHnVWMQ2WBEmz78qhENmmSBV89XOSQW1fsoc9pPHZGdImGEZqtDazU qAbtG2imSxIQmeCljO0T5otetIvwkOXqF2lmMIrflBrDbafuCYicyjEK2k7juHfqXE z7zcJxiQO5xYNCnb9vGZjXQkEOJocYFQLbzvqLIai/d4GD6xRDYr71FMCBAFXmn/Mr iX+yXNqmVjahye89pcu0mHyl7hSQ/gaaLeJYQBWs+IcT/+1RPLvTYYmJzTFR0hIA9E GrCJyrMzS5L2w== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org Cc: Jaegeuk Kim Subject: [PATCH] f2fs: do not skip updating inode when retrying to flush node page Date: Mon, 13 Jun 2022 10:23:05 -0700 Message-Id: <20220613172305.1559743-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 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