Re: [PATCH v2 01/16] iomap: move async bio read logic into helper function

Christoph Hellwig
2025-09-11T11:09:29Z

> +static void iomap_read_folio_range_bio_async(const struct iomap_iter *iter,
> + struct iomap_readpage_ctx *ctx, loff_t pos, size_t plen)

The _async here feels very misplaced, because pretty much everyting in
the area except for the odd write_begin helper is async, and the postfix
does not match the method name.

Also as a general discussion for naming, having common prefixed for sets
of related helpers is nice. Maybe use iomap_bio_* for all the bio
helpers were're adding here? We can then fix the direct I/O code to
match that later.

> {
> + struct folio *folio = ctx->cur_folio;
> const struct iomap *iomap = &iter->iomap;
> - loff_t pos = iter->pos;

Looking at the caller, it seems we should not need the pos argument if
we adjust pos just after calculating count at the beginning of the loop.
I think that would be a much better interface.