Re: [PATCH v1 04/16] iomap: use iomap_iter->private for stashing read/readahead bio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux