Re: [PATCH 13/13] iomap: map multiple blocks at a time

Christoph Hellwig
2023-11-29T05:44:30Z

On Tue, Nov 28, 2023 at 09:25:35PM -0800, Darrick J. Wong wrote:
> > - case IOMAP_HOLE:
> > - break;
> > - default:
> > - iomap_add_to_ioend(wpc, wbc, folio, inode, pos);
>
> Hey wait, the previous patch missed the error return here!

Oh. I guess that's what you get for rebasing and reordering a little
too much..

> > index b8d3b658ad2b03..49d93f53878565 100644
> > --- a/include/linux/iomap.h
> > +++ b/include/linux/iomap.h
> > @@ -309,6 +309,13 @@ struct iomap_writeback_ops {
> > /*
> > * Required, maps the blocks so that writeback can be performed on
> > * the range starting at offset.
> > + *
> > + * Can return arbitrarily large regions, but we need to call into it at
> > + * least once per folio to allow the file systems to synchronize with
> > + * the write path that could be invalidating mappings.
>
> Does xfs_map_blocks already return arbitrarily large regions? I think
> it already does since I see it setting imap.br_blockcount in places.

Yes, it does try to convert the entire underlying delalloc extent.