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

Christoph Hellwig
2025-09-12T13:09:59Z

On Fri, Sep 12, 2025 at 01:56:45PM +0200, Andrey Albershteyn wrote:
> > > In addition to being bound by the isize the fiemap_read() copies
> > > data to the iov_iter, which is not really needed for fsverity.
> >
> > Aka, you want an O_DIRECT read into a ITER_BVEC buffer for the data?
> >
>
> hmm, but we want fsverity merkle tree to be in page cache to use the
> "verified page" flag.

Oh, right. There's this thing called caching :)

> As far as I understand iter_bvec will need a
> page attached anyway, so this is the same. Or am I missing
> something?
>
> And with direct io there's no readahead then, and we don't get any
> benefit going through vfs instead of directly calling to iomap.

Yeah, strike my idea. So yes, you probably do want a lower level
interface that just reads the pages and gives you access to them.

>
> --
> - Andrey
---end quoted text---