On Thu, Jul 15, 2021 at 03:05:05PM -0700, Darrick J. Wong wrote:
On Thu, Jul 15, 2021 at 04:36:32AM +0100, Matthew Wilcox (Oracle) wrote:
quoted
Writeback an entire folio at a time, and adjust some of the variables
to have more familiar names.
@@ -1398,16 +1397,15 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc,
static int
iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)
I imagine at some point this will become iomap_do_writefolio and ther
will be some sort of write_cache_folios() call? Or the equivalent
while(get_next_folio_to_wrote()) iomap_write_folio(); type loop?
I hadn't quite got as far as planning out what to do next with a
replacement for write_cache_pages(). At a minimum, that function is
going to work on folios -- it does anyway; we don't tag tail pages in
the xarray, so the tagged lookup done by write_cache_pages() only finds
folios. So everything we do with a page there is definitely looking at
a folio.
I want to get a lot more filesystems converted to use folios before I
undertake the write_cache_pages() interface overhaul (and I'll probably
think of several things to do to it at the same time -- like working on
a batch of pages all at once instead of calling one indirect function
per folio).