Re: [PATCH v2 13/16] iomap: move read/readahead logic out of CONFIG_BLOCK guard

Joanne Koong
2025-09-16T23:23:39Z

On Thu, Sep 11, 2025 at 4:44 AM Christoph Hellwig <hch@infradead.org> wrote:
>
> On Mon, Sep 08, 2025 at 11:51:19AM -0700, Joanne Koong wrote:
> > There is no longer a dependency on CONFIG_BLOCK in the iomap read and
> > readahead logic. Move this logic out of the CONFIG_BLOCK guard. This
> > allows non-block-based filesystems to use iomap for reads/readahead.
>
> Please move the bio code into a new file. Example patch attached below
> that does just that without addressing any of the previous comments:
>
> diff --git a/fs/iomap/Makefile b/fs/iomap/Makefile
> index f7e1c8534c46..a572b8808524 100644
> --- a/fs/iomap/Makefile
> +++ b/fs/iomap/Makefile
> @@ -14,5 +14,6 @@ iomap-y += trace.o \
> iomap-$(CONFIG_BLOCK) += direct-io.o \
> ioend.o \
> fiemap.o \
> - seek.o
> + seek.o \
> + bio.o
> iomap-$(CONFIG_SWAP) += swapfile.o
...

The version of this for v3 is pretty much exactly what you wrote. i'll
add a signed-off-by attributing the patch to you when I send it out.

Thanks,
Joanne