On Wed, Sep 03, 2025 at 01:30:31PM -0700, Darrick J. Wong wrote: > On Fri, Aug 29, 2025 at 04:56:15PM -0700, Joanne Koong wrote: > > Use the iomap_iter->private field for stashing any read/readahead bios > > instead of defining the bio as part of the iomap_readpage_ctx struct. > > This makes the read/readahead interface more generic. Some filesystems > > that will be using iomap for read/readahead may not have CONFIG_BLOCK > > set. > > Sorry, but I don't like abusing iomap_iter::private because (a) it's a > void pointer which means shenanigans; and (b) private exists to store > some private data for an iomap caller, not iomap itself. I don't think we can do without the void pointer for a generic lower library, but I fully agree on not using iomap_iter::private. We'll need that for something caller provided sooner or later. The right way ahead is to have a void pointer for the I/O-type specific context in iomap_readpage_ctx, and then hopefully reasonable type safe wrappers around it.