xfs: queue inactivation immediately when quota is nearing enforcement
authorDarrick J. Wong <djwong@kernel.org>
Fri, 6 Aug 2021 18:05:40 +0000 (11:05 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 9 Aug 2021 17:52:18 +0000 (10:52 -0700)
commit108523b8de676a45cef1f6c8566c444222b85de0
treef9a89cf8a2114065ecb7f17846dbb20008f5d615
parent7d6f07d2c5ad9fce298889eeed317d512a2df8cd
xfs: queue inactivation immediately when quota is nearing enforcement

Now that we have made the inactivation of unlinked inodes a background
task to increase the throughput of file deletions, we need to be a
little more careful about how long of a delay we can tolerate.

Specifically, if the dquots attached to the inode being inactivated are
nearing any kind of enforcement boundary, we want to queue that
inactivation work immediately so that users don't get EDQUOT/ENOSPC
errors even after they deleted a bunch of files to stay within quota.

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