On Tue, Aug 20, 2024 at 09:44:27PM -0700, Darrick J. Wong wrote: > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > > How hard is it to hit this race?a I guess all you have to do is statx > in a loop while doing a bunch of cow writeback? Yes. That's essential what generic/615 is doing. Now without always_cow you'd need to do this on freshly reflinked inodes, which makes the reproducer a bit harder to create. > > ip->i_nblocks += len; > > + ip->i_delayed_blks -= len; > > This proabably ought to have a comment to reference xfs_bmap_defer_add. Ok. > > bi->bi_owner = *ipp; > > xfs_bmap_update_get_group(mp, bi); > > > > + /* see __xfs_bmap_add for details */ > > xfs_bmap_defer_add? Yes.