On Fri, Dec 13, 2024 at 09:13:53AM -0800, Darrick J. Wong wrote: > > > I wonder if this is true of alwayscow inodes in general, not just zoned > > > inodes? > > > > Maybe I'm missing something, but AFAICS always_cow still generates > > preallocations in xfs_buffered_write_iomap_begin. It probably shouldn't. > > For non-zoned alwayscow I think it's trying to generate preallocations > in the cow fork to reduce fragmentation of the bmbt since we don't have > to write in the linear order. Ah yes, and xfs_can_free_eofblocks only deals with the data fork. > > > Btw, the always_cow code as intended as the common support code for > > zoned and atomic msync style atomic writes, which always require hard > > out of place writes. It turns out it doesn't actually do that right > > now (see the bounce buffering patch reviewed earlier), which makes it > > a bit of an oddball. I'd personally love to kill it once the zoned > > code lands, as just running the zoned mode on a regular device actually > > gives you a good way to test always out of place write semantics, > > which ended up diverging a bit from the earlier version after it hit > > the hard reality of hardware actually enforcing out of place writes. > > Which patch is the bounce buffering patch? [PATCH 12/43] xfs: refine the unaligned check for always COW inodes in xfs_file_dio_write