Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1381943rwl; Fri, 4 Nov 2022 13:16:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7jCW1Ol7BRbieS3I4z9p65ynbuTVyQE6tLWemziDcDYKMq/c8a8JQoTa0DqbQqCUqimKfn X-Received: by 2002:a17:906:749a:b0:7ad:fc15:c9f0 with SMTP id e26-20020a170906749a00b007adfc15c9f0mr17406699ejl.68.1667592973732; Fri, 04 Nov 2022 13:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667592973; cv=none; d=google.com; s=arc-20160816; b=d7tyrqIZIQ3Hah6b5CpL8o3MvDOSEoDbsvrbTVze00E/t4ZAqxAmLWe0yXexEVBvi2 baS9c1DBXMVI2WnP0GhSM7U7sy5Xsvru+PyVJOGxg/+Ozc0tzLwfKxsbILURQgCU1qQe /d/l3DpFhKE4AagqnUeUJYOXpjlt1joBhU0gRiTf2+Xtn8PnbJz88EpcEK/gNRXGK97w XBEB6js7CiYjlhJ/xlNJGe/a9Q5vcTH3lWHtcXoU477SrcPulRqTyFat5QWGYKyfXtTy HhIkG/RxZsjBZQwBJQWw5EowhhD3K1yGUFFidLp1xrb5yviimNMNuSFaT3iuWI2fxyhR BL0w== 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=s2O/qvDFRXf6wsYKSZLjcNGb+D8yn522RgYWCb7F9IA=; b=HOd3vEK6SZcYVY+168rv8vAZerpt1os1pg+PkARQHirpS5fWvC1x5XGHiKHqB0F1lh YljuWsp7EKZz0XUaBS4xAEBctPXKHExIhUPnUT1eoZ7afec3UH5oz9l/rpjhsVceRiJj iwfMeu/4LsoiTFcKUjenreBRoNzeQFK16sHfkMCQ43AP8OxcTEzkxocCUWlJO8Lxjx+c X0uLi0vu59kxICRHpHTMIhg08oeas30IQC9/1BVc5/jgr2pF+asQ7B77NXHvyVqlb3vK WgykkuR1Izye22vGstXiT0Z2Hb/GYOHvTOe5Gp4OvyVY/RN7f/oTSBdt8Z7V3tkUG90f yXoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=GtnDjMYQ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 b9-20020aa7cd09000000b0045da52f303csi382560edw.213.2022.11.04.13.15.45; Fri, 04 Nov 2022 13:16:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=casper.20170209 header.b=GtnDjMYQ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229650AbiKDUG4 (ORCPT + 99 others); Fri, 4 Nov 2022 16:06:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbiKDUGz (ORCPT ); Fri, 4 Nov 2022 16:06:55 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE3A623C; Fri, 4 Nov 2022 13:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=s2O/qvDFRXf6wsYKSZLjcNGb+D8yn522RgYWCb7F9IA=; b=GtnDjMYQ5z4Z0YK9fPQqghVAUu S1NnClGtXQ3weaDOyQ9V0+0Pia32moBZqAjUYqkInOBGfZeixA7s3fZHLaEqsaXw7xHFxvuj7Bk2D NGp2vaLcYpNUIXvducZ7V1dGW0tYCtdUikNkvwwd0nwwxQ2w6UAsvh2cvrULg6KAH8QmFp7WA2c2t AZc9EHn3KODznyd/NQ3mZ8pYJ2EjOwTOoAkuCzZ9oZmGEy5PBpIJLR/l0lQMr9fYyRC55QvSOvYxC AH/s8bS6XlEJM43lfJ6ozC36C89WNlhsRSaVoZT4F4UNLptNZsF/H6SfN7ucyrFXy4U6Q8jCS/It+ hkGNj1Ng==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1or2xl-007dIx-Tf; Fri, 04 Nov 2022 20:06:49 +0000 Date: Fri, 4 Nov 2022 20:06:49 +0000 From: Matthew Wilcox To: Dave Chinner Cc: Vishal Moola , linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, linux-cifs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nilfs@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 04/23] page-writeback: Convert write_cache_pages() to use filemap_get_folios_tag() Message-ID: References: <20220901220138.182896-1-vishal.moola@gmail.com> <20220901220138.182896-5-vishal.moola@gmail.com> <20221018210152.GH2703033@dread.disaster.area> <20221104003235.GZ2703033@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221104003235.GZ2703033@dread.disaster.area> 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-ext4@vger.kernel.org On Fri, Nov 04, 2022 at 11:32:35AM +1100, Dave Chinner wrote: > At minimum, it needs to be documented, though I'd much prefer that > we explicitly duplicate write_cache_pages() as write_cache_folios() > with a callback that takes a folio and change the code to be fully > multi-page folio safe. Then filesystems that support folios (and > large folios) natively can be passed folios without going through > this crappy "folio->page, page->folio" dance because the writepage > APIs are unaware of multi-page folio constructs. There are a lot of places which go through the folio->page->folio dance, and this one wasn't even close to the top of my list. That said, it has a fairly small number of callers -- ext4, fuse, iomap, mpage, nfs, orangefs. So Vishal, this seems like a good project for you to take on next -- convert write_cache_pages() to write_cache_folios() and writepage_t to write_folio_t.