From mboxrd@z Thu Jan 1 00:00:00 1970 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 399D0EB64D9 for ; Tue, 27 Jun 2023 04:03:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbjF0EDm (ORCPT ); Tue, 27 Jun 2023 00:03:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjF0EDj (ORCPT ); Tue, 27 Jun 2023 00:03:39 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08D21E59; Mon, 26 Jun 2023 21:03:39 -0700 (PDT) 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=FNs3BplCPpnzdNu8i3c1Y/TSPIbiewFjVDwcw/mDzZw=; b=T3rmNnOpj5XKSDGjcuQrs5ZBg4 /nn2S/AteGGEHrBO0qfJU9TMNv/g38NgqwqQVavNNc+NpqIIwd6FzbE26Exa85Mm2izeWaL/tyEsI DkN1FWnNdsllVxQk6aDksH2AhMpr11JogGhCkxunKv8ogiz5ioqkZVckNXYXLxf+e6G4T09nNnjxw fAilwjhW+nZaA0yebzTpMEnq5sWsW1jHQdS8sT6BWvsXh7BQm/0nMBhJMA1kxDBW210uHZ73fl4Ap dlnfsMnCt66iTPaV02aFdD7iXITrxYxh/NVgV7sCE1Xzcm+FR5aaqvWER8ayQxn/z/yn36TAmJUG4 iGOcf6rw==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qDzvU-00Be61-1r; Tue, 27 Jun 2023 04:03:36 +0000 Date: Mon, 26 Jun 2023 21:03:36 -0700 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , David Howells Subject: Re: [PATCH 00/12] Convert write_cache_pages() to an iterator Message-ID: References: <20230626173521.459345-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230626173521.459345-1-willy@infradead.org> 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-kernel@vger.kernel.org On Mon, Jun 26, 2023 at 06:35:09PM +0100, Matthew Wilcox (Oracle) wrote: > Dave Howells doesn't like the indirect function call imposed by > write_cache_pages(), so refactor it into an iterator. I took the > opportunity to add the ability to iterate a folio_batch without having > an external variable. > > This is against next-20230623. If you try to apply it on top of a tree > which doesn't include the pagevec removal series, IT WILL CRASH because > it won't reinitialise folio_batch->i and the iteration will index out > of bounds. > > I have a feeling the 'done' parameter could have a better name, but I > can't think what it might be. Heh, I actually have a local series with a minor subset of some of the cleanups, but without the iterator conversion.