On Wed, Mar 27, 2024 at 12:03:13PM +0100, Christoph Hellwig wrote: > The code to account fdblocks and frextents in xfs_bmap_del_extent_delay > is a bit weird in that it accounts frextents before the iext tree > manipulations and fdblocks after it. Given that the iext tree > manipulations cannot fail currently that's not really a problem, but > still odd. Move the frextent manipulation to the end, and use a > fdblocks variable to account of the unconditional indirect blocks and > the data blocks only freed for !RT. This prepares for following > updates in the area and already makes the code more readable. > > Also remove the !isrt assert given that this code clearly handles > rt extents correctly, and we'll soon reinstate delalloc support for > RT inodes. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> Looks good. Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx