Re: [PATCH v2 09/18] ext2: convert iomap ops to ->iomap_next()
From: Jan Kara
Date: Wed Jul 01 2026 - 06:07:29 EST
On Tue 30-06-26 17:09:24, Joanne Koong wrote:
> Convert ext2 iomap_ops to the new ->iomap_next() callback. This uses the
> iomap_process() helper, which finishes the previous mapping if needed
> and produces the next one. No functional changes are intended.
>
> Signed-off-by: Joanne Koong <joannelkoong@xxxxxxxxx>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@xxxxxxx>
Honza
> ---
> fs/ext2/inode.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
> index 29808629cce5..0693059caa35 100644
> --- a/fs/ext2/inode.c
> +++ b/fs/ext2/inode.c
> @@ -860,9 +860,15 @@ ext2_iomap_end(struct inode *inode, loff_t offset, loff_t length,
> return 0;
> }
>
> +static int ext2_iomap_next(const struct iomap_iter *iter, struct iomap *iomap,
> + struct iomap *srcmap)
> +{
> + return iomap_process(iter, iomap, srcmap, ext2_iomap_begin,
> + ext2_iomap_end);
> +}
> +
> const struct iomap_ops ext2_iomap_ops = {
> - .iomap_begin = ext2_iomap_begin,
> - .iomap_end = ext2_iomap_end,
> + .iomap_next = ext2_iomap_next,
> };
>
> int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
> --
> 2.52.0
>
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR