diff options
| author | Joanne Koong <joannelkoong@gmail.com> | 2026-07-29 12:27:20 -0700 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-07-31 12:28:49 +0200 |
| commit | 26dfed9c7a289089b76cff9ab9e4c66b6f90e872 (patch) | |
| tree | 757be59fedb43f46f6ea17c5c7b4312829695c2d /include/linux/bnge/git@git.tavy.me:linux.git | |
| parent | eecfab484dc7b4156d4297b723da20bbc46e92b9 (diff) | |
iomap: add ->iomap_next()
Have one ->iomap_next() callback instead of ->iomap_begin() and
->iomap_end(). ->iomap_next() finishes the previous mapping if needed,
and produces the next mapping.
Collapsing to a single callback lets a performance-critical caller
inline its iteration loop and pass its ->iomap_next() function as a
compile-time constant, so the compiler can devirtualize that callback
into a direct call instead of an indirect call through a function
pointer.
iomap_iter() uses ->iomap_next() when the filesystem provides that
callback and otherwise falls back to the ->iomap_begin()/->iomap_end()
path, so filesystems can be converted one at a time.
Suggested-by: Christoph Hellwig <hch@lst.de>
Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://patch.msgid.link/20260729192737.3190206-6-joannelkoong@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux/bnge/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
