On Thu, Nov 23, 2023 at 09:26:44AM +1100, Dave Chinner wrote: > I think that was me No, it was Darrick. We talkd about a lot of things, but not this :) > , as part of aligning the writeback path with > the ->iomap_valid() checks in the write path after we lock the folio > we instantiated for the write. > > It's basically the same thing - once we have a locked folio, we have > to check that the cached iomap is still valid before we use it for > anything. Yes. Currently we do that in the wb ops ->map_blocks. This can get called multiple times per folio, which is a bit silly. With the series I just posted the link to we at least stop doing that if the folio is mapped contiguously, which solves all practical cases, as the sequence check is almost free compared to the actual block mapping. For steps beyond that I'll reply to Darrick's mail.