On Wed, May 17, 2023 at 02:48:12PM -0400, Brian Foster wrote: > But I also wonder.. if we can skip the iop alloc on full folio buffered > overwrites, isn't that also true of mapped writes to folios that don't > already have an iop? Yes. > I.e., I think what I was trying to do in the > previous diff was actually something like this: > > bool iomap_dirty_folio(struct address_space *mapping, struct folio *folio) > { > iop_set_range_dirty(mapping->host, folio, 0, folio_size(folio)); > return filemap_dirty_folio(mapping, folio); > } > > ... which would only dirty the full iop if it already exists. Thoughts? That does sound pretty good to me, and I can't think of any obvious pitfall.