On Tue, Jan 12, 2021 at 12:01:33PM -0500, Brian Foster wrote: > > I think this is in many ways wrong. As far as I can tell you want this > > so that we get the imap_spans_range in xfs_direct_write_iomap_begin. But > > we should not trigger any of the other checks, so we'd really need > > another flag instead of reusing this one. > > > > It's really the br_state != XFS_EXT_NORM check that we want for the > unaligned case, isn't it? Inherently, yes. But if we want to avoid the extra irec lookup outside ->iomap_begin we have to limit us to a single I/O, as we'll do a partial write otherwise if only the extent that the end of write falls into is unwritten and not block aligned.