Re: [PATCH 02/10] iomap: remove iomap_file_buffered_write_punch_delalloc

Darrick J. Wong
2024-09-24T06:05:16Z

On Tue, Sep 24, 2024 at 07:55:33AM +0200, Christoph Hellwig wrote:
> On Mon, Sep 23, 2024 at 09:18:25AM -0700, Darrick J. Wong wrote:
> > > + * When a short write occurs, the filesystem may need to remove reserved space
> > > + * that was allocated in ->iomap_begin from it's ->iomap_end method. For
> >
> > "When a short write occurs, the filesystem may need to remove space
> > reservations created in ->iomap_begin.
>
> This just moved the text from the existing comment. I agree that your
> wording is better, but I'd keep the "from it's ->iomap_end".

Yeah, please do. What do you think of:

"When a short write occurs, the filesystem might need to use ->iomap_end
to remove space reservations created in ->iomap_begin." ?

> > Unrelated question about iomap_write_begin: Can we get rid of the
> > !mapping_large_folio_support if-body just prior to __iomap_get_folio?
> > filemap_get_folio won't return large folios if
> > !mapping_large_folio_support, so I think the separate check in iomap
> > isn't needed anymore?
>
> From the iomap POV it seems like we could (after checking no one
> is doing something weird with len in ->get_folio).

The only user I know of is gfs2, which allocates a transaction and then
calls iomap_get_folio with pos/len unchanged.

--D