On Thu, Apr 25, 2024 at 06:58:50PM +0530, Ritesh Harjani (IBM) wrote: > +static loff_t iomap_read_folio_iter(const struct iomap_iter *iter, > + struct iomap_readpage_ctx *ctx) > +{ > + struct folio *folio = ctx->cur_folio; > + size_t pos = offset_in_folio(folio, iter->pos); "pos" is position in file. You should call this 'offset'. > + loff_t length = min_t(loff_t, folio_size(folio) - pos, > + iomap_length(iter)); > + loff_t done, ret; > + > + for (done = 0; done < length; done += ret) { > + ret = iomap_readpage_iter(iter, ctx, done); > + if (ret <= 0) > + return ret; > + }