On Mon, Jun 16, 2025 at 03:41:12PM -0700, Joanne Koong wrote: > I'm not acquainted with the block io / bio layer so please do ignore > this if my analysis here is wrong, but AFAICT we do still need to add > this range to the ioend in the case where the mapping is already > valid? Should this be "return iomap_add_to_ioend(wpc, folio, offset, > end_pos, len)" instead of return 0? Yes, absolutely. That's what the XFS code does, which is the only thing I tested at this point. All the other conversion look pretty broken right now, and I'm glad you spotted this before I'd run into when testing. > > - } while (dirty_len && !error); > > + ret = wpc->ops->writeback_range(wpc, folio, pos, rlen, end_pos); > > + if (WARN_ON_ONCE(ret == 0)) > > + return -EIO; > > + if (ret < 0) > > + return ret; > > Should we also add a warn check here for if ret > rlen? Yes, that's a good idea.