Can you please check this versus what you suggested inAh, yeah, that ^^ is correct. This needs a better comment then:
https://lore.kernel.org/linux- xfs/20250206215014.GX21808@frogsfrogsfrogs/#t
/*
* Each remapping operation could cause a btree split, so in
* the worst case that's one for each block.
*/
resblks = (end_fsb - offset_fsb) *
XFS_NEXTENTADD_SPACE_RES(mp, 1, XFS_DATA_FORK);