On Tue, Feb 20, 2024 at 10:47:12AM +1100, Dave Chinner wrote: > Ok. If you delay the ip->i_delayed_blks and quota accounting until > after the incore extent tree updates are done, this code doesn't > need to undo anything and can just return an error. We should also > keep in mind that an error here will likely cause a filesystem > shutdown when the transaction is canceled.... Yes. However (as documented in the commit log), the only place where I think it can actually happen is on a buffered write errors as "real" hole punches always flush delalloc space before. > FWIW, if we are going to do this for rt, we should probably also > consider do it for normal delalloc conversion when the indlen > reservation runs out due to excessive fragmentation of large > extents. Separate patch and all that, but it doesn't really make > sense to me to only do this for RT when we know it is also needed in > reare cases on non-rt workloads... Can it happen for non-RT extents? That would assume the required new indirect block reservation for splitting an extent would have to be larger than the amount we punch out.