Re: [PATCH v10 01/10] iomap: stash iomap read ctx in the private field of iomap_iter

From: Gao Xiang

Date: Mon Dec 22 2025 - 21:32:12 EST




On 2025/12/23 09:56, Hongbo Li wrote:
It's useful to get filesystem-specific information using the
existing private field in the @iomap_iter passed to iomap_{begin,end}
for advanced usage for iomap buffered reads, which is much like the
current iomap DIO.

For example, EROFS needs it to:

- implement an efficient page cache sharing feature, since iomap
needs to apply to anon inode page cache but we'd like to get the
backing inode/fs instead, so filesystem-specific private data is
needed to keep such information;

- pass in both struct page * and void * for inline data to avoid
kmap_to_page() usage (which is bogus).

Signed-off-by: Hongbo Li <lihongbo22@xxxxxxxxxx>

Reviewed-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>

Thanks,
Gao Xiang