Re: [PATCH v2 18/18] Documentation: iomap: update docs to reflect iomap_next model
From: Christoph Hellwig
Date: Fri Jul 03 2026 - 08:57:38 EST
On Thu, Jul 02, 2026 at 07:00:20PM -0700, Darrick J. Wong wrote:
> The ->begin method can still set iomap::private and the ->end method can
> dispose of it, right? Oh, wait, no, that doesn't work because you're
> talking about ->begin/->end passing something to the next ->begin.
Should we move ->private from struct iomap to struct iomap_iter?
That'll deal with the constness and the fact that private data
really is a per-operation thing.
That also reminds me that now that we actually still keep the low-level
begin/end ops we need to switch them to a calling convention that
passes the iter instead of the ugly container_of. This is something
I wanted deferred until we get the iter conversion, but it turns out
that now leaves them untouched..
> Hm. I was thinking that the signature for iomap_process could be
> cleaner if you didn't have to pass iomap/srcmap explicitly.
> iomap_process could do the (dangerous) casting from the (const struct
> iomap_iter *) to the (struct iomap *) pointers before calling ->begin
> and ->end.
I don't quite understand those part.