From patchwork Tue Jul 19 04:13:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12922101 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39D69CCA481 for ; Tue, 19 Jul 2022 04:13:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236780AbiGSENa (ORCPT ); Tue, 19 Jul 2022 00:13:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236794AbiGSEN3 (ORCPT ); Tue, 19 Jul 2022 00:13:29 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A35E43E764; Mon, 18 Jul 2022 21:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=pTqLT0oM/f1OG7Mculu+9k1UykQrvZTnDdQ2yOVLCdw=; b=L3sLySioEDd7yXl7pI7MayQUtS pzEVyZSkIicu44pZpCG7qC4x6ps3+s7pHGARwMO1lM45ZjV2x98nAcAWgvdXuehb2wbdrOTpgPAn6 qMHIqB6KEiofTpI0L0ClWubeWTRp+D+AI+z/iSBtpielNwukc6KO2tfDXa7DKhDjN+c+RDVFtDnGU YaUd0kIb811heU/YIc8AOwLLEkJtxdG5qv+WYFsBMZ0MIN6Q2Q0FYc94rL8rdSJ54xe4D8YqMrEqR Q3c5W/w5eiNUs9+dRfhfO3SmgsoUp4+n+4A53CNiOPSoyIpk14h7j06r18ECgLmBmxsOuTwgMaEp+ 2qPLzqUg==; Received: from 089144198117.atnat0007.highway.a1.net ([89.144.198.117] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDebk-004jSZ-UL; Tue, 19 Jul 2022 04:13:17 +0000 From: Christoph Hellwig To: Bob Peterson , Andreas Gruenbacher , "Darrick J. Wong" , Damien Le Moal , Naohiro Aota Cc: Johannes Thumshirn , cluster-devel@redhat.com, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 1/4] gfs2: stop using generic_writepages in gfs2_ail1_start_one Date: Tue, 19 Jul 2022 06:13:08 +0200 Message-Id: <20220719041311.709250-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220719041311.709250-1-hch@lst.de> References: <20220719041311.709250-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Use filemap_fdatawrite_wbc instead of generic_writepages in gfs2_ail1_start_one so that the functin can also cope with address_space operations that only implement ->writepages and to properly account for cgroup writeback. Signed-off-by: Christoph Hellwig Reviewed-by: Andreas Gruenbacher --- fs/gfs2/log.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index f0ee3ff6f9a87..a66e3b1f6d178 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -131,7 +131,7 @@ __acquires(&sdp->sd_ail_lock) if (!mapping) continue; spin_unlock(&sdp->sd_ail_lock); - ret = generic_writepages(mapping, wbc); + ret = filemap_fdatawrite_wbc(mapping, wbc); if (need_resched()) { blk_finish_plug(plug); cond_resched(); @@ -222,8 +222,7 @@ void gfs2_ail1_flush(struct gfs2_sbd *sdp, struct writeback_control *wbc) spin_unlock(&sdp->sd_ail_lock); blk_finish_plug(&plug); if (ret) { - gfs2_lm(sdp, "gfs2_ail1_start_one (generic_writepages) " - "returned: %d\n", ret); + gfs2_lm(sdp, "gfs2_ail1_start_one returned: %d\n", ret); gfs2_withdraw(sdp); } trace_gfs2_ail_flush(sdp, wbc, 0);