Hi all, The two patches in this set reorganize the responsibilities between xfs_can_free_eofblocks and xfs_free_eofblocks so that the first becomes a true predicate, and the second becomes a simple update function. The goal is to be able to use the predicate to decide if a linked but unopened inode has speculative post-EOF preallocations and hence must go through the extra inactivation step. This requires a slight change in behavior of the background block gc workers, which will try to take the IOLOCK before calling the predicate. If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below. This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome. --D kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=refactor-has-eofblocks-5.13 --- fs/xfs/xfs_bmap_util.c | 148 +++++++++++++++++++++++++----------------------- fs/xfs/xfs_icache.c | 12 +--- 2 files changed, 82 insertions(+), 78 deletions(-)