xfs: inactivate inodes any time we try to free speculative preallocations
authorDarrick J. Wong <djwong@kernel.org>
Fri, 6 Aug 2021 18:05:41 +0000 (11:05 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 9 Aug 2021 17:52:18 +0000 (10:52 -0700)
commit2eb665027b6528c1a8e9158c2f722a6ec0af359d
treeed11c3daac35e18d04ec8de45d930a38c71c830a
parent65f03d8652b240aa66b99a07e3c423a51e967568
xfs: inactivate inodes any time we try to free speculative preallocations

Other parts of XFS have learned to call xfs_blockgc_free_{space,quota}
to try to free speculative preallocations when space is tight.  This
means that file writes, transaction reservation failures, quota limit
enforcement, and the EOFBLOCKS ioctl all call this function to free
space when things are tight.

Since inode inactivation is now a background task, this means that the
filesystem can be hanging on to unlinked but not yet freed space.  Add
this to the list of things that xfs_blockgc_free_* makes writer threads
scan for when they cannot reserve space.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_icache.c