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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10980C4829B for ; Mon, 12 Feb 2024 07:14:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8E7E26B0072; Mon, 12 Feb 2024 02:14:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8978E6B0074; Mon, 12 Feb 2024 02:14:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7867F6B0075; Mon, 12 Feb 2024 02:14:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 6A04D6B0072 for ; Mon, 12 Feb 2024 02:14:01 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 321A9A1E79 for ; Mon, 12 Feb 2024 07:14:01 +0000 (UTC) X-FDA: 81782287482.13.4F53C41 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf11.hostedemail.com (Postfix) with ESMTP id 0BC4940010 for ; Mon, 12 Feb 2024 07:13:58 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=4aqPVakn; spf=none (imf11.hostedemail.com: domain of BATV+56c964bc8172c8a9ee6e+7477+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+56c964bc8172c8a9ee6e+7477+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707722039; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=F97bLYKX+BtaQqdKvZ6zCKr5tPLYltyO5pB8VnB7DyA=; b=nV5O8CAD21hBo5es+ZFsd6xIBL+9DiZod0LC73ylTng2Omtl513SZFMIhH9MPHvRNctddF Yd1+wthLLOpwXb1K1jT3ss7TWzDkTINHI5dNVGxTA2zUYUEzEIwDC9ynSjoLIh3KyEqepy gwsohCCJS+cHLOq4OQACP65Y/15Wk0A= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707722039; a=rsa-sha256; cv=none; b=FIWj3Jr5PSDq/5QqRyslGjtUuuvL0XXaJQT19fRlhpqvp/mphn9MeyC9wapZiNI7UyM9zo 6ROgL5LIqlafSrpTQWTyPWHzBRTQs0zvdwbEPF74xAA8XJ7F2KAf/VZ8FxKEjLogQ4STUz Fry0/YZU02OpXXhD9Pea2bsFYce58ck= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=4aqPVakn; spf=none (imf11.hostedemail.com: domain of BATV+56c964bc8172c8a9ee6e+7477+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+56c964bc8172c8a9ee6e+7477+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none 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:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=F97bLYKX+BtaQqdKvZ6zCKr5tPLYltyO5pB8VnB7DyA=; b=4aqPVaknlyIJIU/z9Rj2PWIFIR gWqDxrfe5riQ85yrUwhbveTBuNTrirZObB9P/jMU7KtJMbKyYUBw6SNKsJqThxbUWHxEpkQxdlq5T yHVvpIkL34rbjQYM87m42lQmG7s0YeDzRLOse5XSIULK03Dmork+2CEUhoDf36pDaxjpm0AWVwG0Y Q7wwTmh3m18pwDpkodGLUxNCmk1d6CnoSPLx03FGnUHKtKw2rglu9qBDBfJjX66LSyjNDh43ur9ds Bzdx+PNRH6p8wrWY4E1MPXuTWnEZ++H+uSunR3UctYA8QJ/xRrhGBMiYUJ8XHfOkESLoaBY96PSqs VYA0UW+g==; Received: from [2001:4bb8:190:6eab:75e9:7295:a6e3:c35d] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZQVo-00000004Slf-2xag; Mon, 12 Feb 2024 07:13:57 +0000 From: Christoph Hellwig To: linux-mm@kvack.org Cc: Matthew Wilcox , Jan Kara , David Howells , Brian Foster , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: convert write_cache_pages() to an iterator v7 Date: Mon, 12 Feb 2024 08:13:34 +0100 Message-Id: <20240212071348.1369918-1-hch@lst.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Stat-Signature: ncqqhy5pqqs3isphe5t8ke8qoxpf7drx X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 0BC4940010 X-Rspam-User: X-HE-Tag: 1707722038-863301 X-HE-Meta: U2FsdGVkX18IefNIoK9Cs926ZBPVTHGWH2U1bijVxiTPWO2BQ7VpPteVpWPSeoi/PobOc6PDIwWy/7YsfMLBgZ4XuW2hOs4ctvwaeqm3RTL3bf3uv86EUcmFWGY/0XBODa6/gbF59FiLqfK9NRYeAVu9viRFsvOhK2gqj0TQQpMl4oOhESZzvLkTaEmfQPJ9pIiz2wdqhaiz6yLc2uBh28bn+wnAUfACMaOM6YGfztfRH1EufVluQvWFPUYWzFn+rIgTul/P8W/Yz7o/4w0Zm9qtpWyyjtsre5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X8cgSSfEVDOzhJ4VnTJbCxW3hG9hX0b9yRPptUm/T4z2CyZEOeTfOpCujW5YGuUCZng/heqtAlF7fZz1EDM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi all, this is an evolution of the series Matthew Wilcox originally sent in June 2023, which has changed quite a bit since and now has a while based iterator. Note that in this version two patches are so different from the previous version that I've not kept any Reviews or Acks for them, even if the final result look almost the same as the previous patches with the incremental patch on the list. Changes since v6: - don't access folio->index after releasing the folio batch - add a new patch to fix a pre-existing bug where a positive value is passed to mapping_set_error Changes since v5: - completely reshuffle the series to directly prepare for the writeback_iter() style. - don't require *error to be initialized on first call - improve various comments - fix a bisection hazard where write_cache_pages don't return delayed error for a few commits - fix a whitespace error - drop the iomap patch again for now as the iomap map multiple blocks series isn't in mainline yet Changes since v4: - added back the (rebased) iomap conversion now that the conflict is in mainline - add a new patch to change the iterator Changes since v3: - various commit log spelling fixes - remove a statement from a commit log that isn't true any more with the changes in v3 - rename a function - merge two helpers Diffstat: include/linux/pagevec.h | 18 ++ include/linux/writeback.h | 12 + mm/page-writeback.c | 389 ++++++++++++++++++++++++++-------------------- 3 files changed, 249 insertions(+), 170 deletions(-)