On Thu, Jun 25, 2026 at 10:47:58AM -0700, Darrick J. Wong wrote:
> On Thu, Jun 25, 2026 at 02:07:57PM +0200, Christoph Hellwig wrote:
> > Currently the iomap buffered read path tries to build up read context
> > (i.e. bios for the typical block based case) over multiple iomaps as
> > long as the sector matches. This does not take into account files
> > that can map to multiple different devices. While this could be fixed
> > by a bdev check in iomap_bio_read_folio_range, the building up of I/O
> > over iomaps actually was a problem for the not yet merged ext2 iomap
> > port, as that does want to send out I/O at the end of an indirect
> > block mapped range.
>
> This really puts the onus on block-mapped filesystems (e.g. ext2) to
> merge adjacent maps into extents. Granted they *probably* already have
> been doing that.
Yes. In fact the ext2 conversion was the first ask for this change,
because they do not want unlimited merging but kick off I/O at the
indirect block boundary.
> > So instead of adding more checks move over to a model where a bio only
> > spans a single iomap. Change ->submit_read to be called after each
> > iteration, and pass a force argument to indicate that the bio must
> > be submitted set on the last iteration. Switch the bio based users
> > to always submit, while keeping the single submit for fuse.
>
> Is fuse the sole reason for the "force" parameter to exist? I wonder if
> fuse could drop its submit_read function and call fuse_send_readpages
> after the iomap_read{ahead,folio} function returns?
Probably..