[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231218153553.807799-1-hch@lst.de>
Date: Mon, 18 Dec 2023 16:35:36 +0100
From: Christoph Hellwig <hch@....de>
To: linux-mm@...ck.org
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
Jan Kara <jack@...e.com>,
David Howells <dhowells@...hat.com>,
Brian Foster <bfoster@...hat.com>,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Convert write_cache_pages() to an iterator v3
Hi all,
this is basically a evolution of the series Matthew Wilcox originally
set in June. Based on comments from Jan a Brian this now actually
untangles some of the more confusing conditional in the writeback code
before refactoring it into the iterator. Because of that all the
later patches need a fair amount of rebasing and I've not carried any
reviewed-by over.
The original cover letter is below:
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.
Diffstat:
include/linux/pagevec.h | 18 ++
include/linux/writeback.h | 19 ++
mm/page-writeback.c | 333 +++++++++++++++++++++++++---------------------
3 files changed, 220 insertions(+), 150 deletions(-)
Powered by blists - more mailing lists