Re: [PATCH 07/12] iomap: rename iomap_writepage_map to iomap_writeback_folio

Darrick J. Wong
2025-07-02T18:26:36Z

On Fri, Jun 27, 2025 at 09:02:40AM +0200, Christoph Hellwig wrote:
> ->writepage is gone, and our naming wasn't always that great to start
> with.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Yesssssss (and fixes the trace problems too)
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
> fs/iomap/buffered-io.c | 10 +++++-----
> fs/iomap/trace.h | 2 +-
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index 3e0ce6f42df5..c28eb6a6eee4 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -1586,7 +1586,7 @@ static int iomap_writeback_range(struct iomap_writeback_ctx *wpc,
> * If the folio is entirely beyond i_size, return false. If it straddles
> * i_size, adjust end_pos and zero all data beyond i_size.
> */
> -static bool iomap_writepage_handle_eof(struct folio *folio, struct inode *inode,
> +static bool iomap_writeback_handle_eof(struct folio *folio, struct inode *inode,
> u64 *end_pos)
> {
> u64 isize = i_size_read(inode);
> @@ -1638,7 +1638,7 @@ static bool iomap_writepage_handle_eof(struct folio *folio, struct inode *inode,
> return true;
> }
>
> -static int iomap_writepage_map(struct iomap_writeback_ctx *wpc,
> +static int iomap_writeback_folio(struct iomap_writeback_ctx *wpc,
> struct folio *folio)
> {
> struct iomap_folio_state *ifs = folio->private;
> @@ -1654,9 +1654,9 @@ static int iomap_writepage_map(struct iomap_writeback_ctx *wpc,
> WARN_ON_ONCE(folio_test_dirty(folio));
> WARN_ON_ONCE(folio_test_writeback(folio));
>
> - trace_iomap_writepage(inode, pos, folio_size(folio));
> + trace_iomap_writeback_folio(inode, pos, folio_size(folio));
>
> - if (!iomap_writepage_handle_eof(folio, inode, &end_pos)) {
> + if (!iomap_writeback_handle_eof(folio, inode, &end_pos)) {
> folio_unlock(folio);
> return 0;
> }
> @@ -1741,7 +1741,7 @@ iomap_writepages(struct iomap_writeback_ctx *wpc)
> return -EIO;
>
> while ((folio = writeback_iter(mapping, wpc->wbc, folio, &error)))
> - error = iomap_writepage_map(wpc, folio);
> + error = iomap_writeback_folio(wpc, folio);
>
> /*
> * If @error is non-zero, it means that we have a situation where some
> diff --git a/fs/iomap/trace.h b/fs/iomap/trace.h
> index aaea02c9560a..6ad66e6ba653 100644
> --- a/fs/iomap/trace.h
> +++ b/fs/iomap/trace.h
> @@ -79,7 +79,7 @@ DECLARE_EVENT_CLASS(iomap_range_class,
> DEFINE_EVENT(iomap_range_class, name, \
> TP_PROTO(struct inode *inode, loff_t off, u64 len),\
> TP_ARGS(inode, off, len))
> -DEFINE_RANGE_EVENT(iomap_writepage);
> +DEFINE_RANGE_EVENT(iomap_writeback_folio);
> DEFINE_RANGE_EVENT(iomap_release_folio);
> DEFINE_RANGE_EVENT(iomap_invalidate_folio);
> DEFINE_RANGE_EVENT(iomap_dio_invalidate_fail);
> --
> 2.47.2
>
>