Re: [PATCH RFC 02/29] iomap: introduce iomap_read/write_region interface

Christoph Hellwig
2025-08-11T11:43:41Z

On Tue, Jul 29, 2025 at 03:22:52PM -0700, Darrick J. Wong wrote:
> ...and these sound a lot like filemap_read and iomap_write_iter.
> Why not use those? You'd get readahead for free. Though I guess
> filemap_read cuts off at i_size so maybe that's why this is necessary?
>
> (and by extension, is this why the existing fsverity implementations
> seem to do their own readahead and reading?)
>
> ((and now I guess I see why this isn't done through the regular kiocb
> interface, because then we'd be exposing post-EOF data hiding to
> everyone in the system))

Same thoughts here. It seems like we should just have a beyond-EOF or
fsverity flag for ->read_iter / ->write_iter and consolidate all this
code. That'll also go along nicely with the flag in the writepage_ctx
suggested by Joanne.