From patchwork Mon Jan 9 05:18:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 40668 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1985002wrt; Sun, 8 Jan 2023 21:20:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXu2j3Ds0NxkVJgFzxjT1VGGzoPEhzDh6eMz7Eg1HagFWg9PfQGnFE7fHXpVVGB2vFute4so X-Received: by 2002:a62:2545:0:b0:581:fc19:4aa3 with SMTP id l66-20020a622545000000b00581fc194aa3mr36766973pfl.0.1673241606979; Sun, 08 Jan 2023 21:20:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673241606; cv=none; d=google.com; s=arc-20160816; b=yx8lGLdh66DDR6NGeLvLixl0Y6UHF2ZSPc7E+NvF86C2yUuQ6HtYYwtyda2JIyucpl JVFkSXCovYuROg7/qetwpWiBQECJTsF3aPMsQZtgg/WWWdIdRBmGgKb1t6iCmGWhL6ry PNdyYo058fK0wV0nbcbGFDHVmlFa1C40IPvXhPPiGzwsYeNNhc/Rpg6Arikq8s43nTMy RFQVlieCfx7LyIl3Elo3FYynJhdjiqOHBSX7wPiL5NGekWkBSiuGYWeTk5/395S7nIfq AV+kyuLgztRGO4fDY6Xpx+c83unc+8fyiFJwo8zYagLUuZukd4zwmuY8LMu2XUK4YJ1m MRBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=q/yHyMldu60gOBaQs0jTxyPBD38OhQT4AJEanuofTzA=; b=WD6opM1HPSvxeses/GJ4wXEv06YNQIS/dCBqb3tQW86/kMoHvNZtnQaQVdxbEAfNjV o/TyK9P0n4/RO6ogqETappKppJ431xPPpr/cFA+XzaSPuO3Aelazbl3JN96Xu76Qk2S+ 4JAd+t7CIbho1seKq4nn5COJWLPLFT7idg/6WRjqxVDvQ3hOlVn369BnLGBroa2AHR0M G8z3VWgXRQLfss5w3gfklGDzbdtlm83KIbR/+rRpUzeBKRg+hx1nfJRf8DA1EGzduBXC +wZhS60GjCh1a1a4GpJszltP7rmoVjWgNVN2ml7J1kkSnMGta9e4Nc4fjOGYfYYdfhHs Hdpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=iVygUdYU; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x42-20020a056a000bea00b00581da213e4fsi7993763pfu.350.2023.01.08.21.19.54; Sun, 08 Jan 2023 21:20:06 -0800 (PST) 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=fail header.i=@infradead.org header.s=casper.20170209 header.b=iVygUdYU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236534AbjAIFTj (ORCPT + 99 others); Mon, 9 Jan 2023 00:19:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236122AbjAIFSV (ORCPT ); Mon, 9 Jan 2023 00:18:21 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF662CE16; Sun, 8 Jan 2023 21:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=q/yHyMldu60gOBaQs0jTxyPBD38OhQT4AJEanuofTzA=; b=iVygUdYUAJcdSPVDpeLxNQYVjX VZ2eUIAr5Ni+Oq6UGlvHzp4wUhACJQlG+KVRJBJsBYXc1bElntXZ9kqQZPw8xJ1uMo9SviLIzgjB/ 4osnd9cWjUDxrDgHRBs2L3rrTD3u/kTJ9kxjdg1fqA2JTvD1KaonAc6P7HxK2kpd13noRlgtZSdQs /6GV9vYKYJNFilnTeuY/k/DjIGsd5d3k+A24w5+VIhfm31A30b6n0A9heS7y6kXjUPEXgm42wFA6X PuBqeYRiNfeuoD7/Jaiv8zElM3UVQOwf1xBIJNJ7j+aRCqZlyr5dbmR8mGAHAdXVWwd7VTg+FteSH n5LpyBKg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEkYD-0020wr-6J; Mon, 09 Jan 2023 05:18:25 +0000 From: "Matthew Wilcox (Oracle)" Cc: "Matthew Wilcox (Oracle)" , Jeff Layton , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Hellwig Subject: [PATCH 03/11] f2fs: Convert f2fs_wait_on_node_pages_writeback() to errseq Date: Mon, 9 Jan 2023 05:18:15 +0000 Message-Id: <20230109051823.480289-4-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230109051823.480289-1-willy@infradead.org> References: <20230109051823.480289-1-willy@infradead.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754520991216077808?= X-GMAIL-MSGID: =?utf-8?q?1754520991216077808?= Convert from the old filemap_check_errors() to the errseq infrastructure. This means we will not report any previously-occurring error, and we will not clear any previously-occurring error. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index dde4c0458704..a87b5515c681 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2055,12 +2055,14 @@ int f2fs_sync_node_pages(struct f2fs_sb_info *sbi, int f2fs_wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, unsigned int seq_id) { + struct address_space *mapping = NODE_MAPPING(sbi); struct fsync_node_entry *fn; struct page *page; struct list_head *head = &sbi->fsync_node_list; unsigned long flags; unsigned int cur_seq_id = 0; int ret2, ret = 0; + errseq_t since = filemap_sample_wb_err(mapping); while (seq_id && cur_seq_id < seq_id) { spin_lock_irqsave(&sbi->fsync_node_lock, flags); @@ -2088,7 +2090,7 @@ int f2fs_wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, break; } - ret2 = filemap_check_errors(NODE_MAPPING(sbi)); + ret2 = filemap_check_wb_err(mapping, since); if (!ret) ret = ret2;