Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp293338rwj; Fri, 23 Dec 2022 01:13:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXsEMqcnQikf1TAWzLRRghSefBI4o1otp3UxEY+sdV0yRWyCBjluw0f1vdMUzpYvZPfxWR/2 X-Received: by 2002:a05:6a20:8f21:b0:af:88d2:33f8 with SMTP id b33-20020a056a208f2100b000af88d233f8mr37853565pzk.7.1671786816941; Fri, 23 Dec 2022 01:13:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671786816; cv=none; d=google.com; s=arc-20160816; b=1GQJRjGcNEQ8qG/X25sTQE0MAgTc7syIBogteWS6QWG/hIZUAV1Scluo06OE85R6no xXaMrNQ4BlW5dQPd/v370K9SyA6bNQdT7faEsnJVEByi2hNW4ID+qnnDfPQYRhzjC6Ds OmXASQWsvTMMiCPKiUtX+BOPjNrpAsMCnbGY0AR/NaDztmSUqpj9VRBeNrFFfibFldIJ mHLJokLnyzvnqKwAF14DztA6OC7lSTglA1Fukh6BY6/CqtI6scFaQ/qEFFq7okL2Biz7 FLrwj3LPmKOxTInOWwPXu3IpvpOA888ySj0Yp4yPtrOZ4IPCBF1Phk8LP4feYprBvccH C9zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fbFBDoUTr0Hz3vXP45guCPqzXQAzMtYZDFQbW7aV/7M=; b=FofpLqsJowJnak4gu+MLTVbxVe4tTFi0PeLNgqknl5o8jApptxRFsCKJwqiqamliO/ GkIEFKSYYJREK62hCSF1NheCq+r7MAxZfzWD7U3ACOIvFlrJsdFXNcegwSHPmlWYhLhT yJzfC4+lyOBhx3DVtwzuGnyCAnLozMhTtuyY+z6mljk2dZk05y9hMzTBTnEcD1reYkvS N6JY3LBO01GB/qeaw/XRr1muZTYHCKSJblK8SSqx58UqsI3+r6eNq0fs1HEiUfSzsvWH QSAsO+RGBwDR8m3Cwdb5WzXeaDqmzRQNi90RU3ADxcyc+MvDJegUjO4E5+B/PWXhmg0K Iz4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=E51cHrJY; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 137-20020a63038f000000b004781187a491si3039184pgd.73.2022.12.23.01.13.27; Fri, 23 Dec 2022 01:13:36 -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=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=E51cHrJY; 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 S236000AbiLWIIE (ORCPT + 67 others); Fri, 23 Dec 2022 03:08:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230176AbiLWIIC (ORCPT ); Fri, 23 Dec 2022 03:08:02 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09DC412623; Fri, 23 Dec 2022 00:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fbFBDoUTr0Hz3vXP45guCPqzXQAzMtYZDFQbW7aV/7M=; b=E51cHrJYUYXCLQJ6msKO9XaW+8 SzQjBaBALne5fVjvNAvOV5qoAzJhYusiS9APVbPLZRIMgmJ7vHa2pr+LksdjkiUicoqtpUYZXNLFN 9bDjsW51Plzixgfu/1HQwqxSRbvphYEqPWc08mBxLgstgTi4TqffHWvFVor42sHep04aR2QZoiHJ9 cydEsdBmqvFVWSWR3FsMvKU0hkKQBd8bHu6sdY4gbMqcF3OiPiol9TM3x7/sFIBON+zQeq5GNAJry xu016McQd+WlF9525pZjlgYolVF64q6K95fNFFNOvo3JJyco1IHDzd6tNVkz7jyKmnvciMq4Uhlf9 38vhvqTg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1p8d5y-0054Xp-JZ; Fri, 23 Dec 2022 08:07:58 +0000 Date: Fri, 23 Dec 2022 00:07:58 -0800 From: Christoph Hellwig To: Vishal Moola Cc: Matthew Wilcox , Chao Yu , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mm@kvack.org, fengnanchang@gmail.com, linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH] f2fs: Convert f2fs_write_cache_pages() to use filemap_get_folios_tag() Message-ID: References: <0a95ba7b-9335-ce03-0f47-5d9f4cce988f@kernel.org> <20221212191317.9730-1-vishal.moola@gmail.com> <6770f692-490e-34fc-46f8-4f65aa071f58@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 21, 2022 at 09:17:30AM -0800, Vishal Moola wrote: > > That said, folio_ref_inct() is very much MM-internal and filesystems > > should be using folio_get(), so please make that modification in the > > next revision, Vishal. > > Ok, I'll go through and fix all of those in the next version. Btw, something a lot more productive in this area would be to figure out how we could convert all these copy and paste versions of write_cache_pages to use common code. This might need changes to the common code, but the amount of duplicate and poorly maintained versions of this loop is a bit alarming: - btree_write_cache_pages - extent_write_cache_pages - f2fs_write_cache_pages - gfs2_write_cache_jdata