Thread (60 messages) 60 messages, 4 authors, 2025-09-19

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

From: Joanne Koong <joannelkoong@gmail.com>
Date: 2025-09-12 16:01:31
Also in: gfs2, linux-doc, linux-fsdevel, linux-xfs

On Thu, Sep 11, 2025 at 7:13 AM Christoph Hellwig [off-list ref] wrote:
quoted
+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.
Great point, I'll change this to "iomap_bio_read_folio_range()" for
the async version and then "iomap_bio_read_folio_range_sync()" for the
synchronous version.
quoted
 {
+     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.
Sounds good, in that case I think we should do the same for the the
buffered writes ->read_folio_range() api later too then to have it
match

Thanks,
Joanne
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help