convert write_cache_pages() to an iterator v7

From: Christoph Hellwig
Date: Mon Feb 12 2024 - 02:14:13 EST


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(-)