xfs: separate the dqrele_all inode grab logic from xfs_inode_walk_ag_grab
authorDarrick J. Wong <djwong@kernel.org>
Mon, 31 May 2021 18:31:58 +0000 (11:31 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 3 Jun 2021 22:56:03 +0000 (15:56 -0700)
commitb9baaef42f764db7089a19c82d2b783aef836437
tree403f10dbd4ef4f807eaa5b5f44c41f079e350cd0
parentc809d7e948a131cba8fdf9fbd0b50e1f59255f50
xfs: separate the dqrele_all inode grab logic from xfs_inode_walk_ag_grab

Disentangle the dqrele_all inode grab code from the "generic" inode walk
grabbing code, and and use the opportunity to document why the dqrele
grab function does what it does.  Since xfs_inode_walk_ag_grab is now
only used for blockgc, rename it to reflect that.

Ultimately, there will be four reasons to perform a walk of incore
inodes: quotaoff dquote releasing (dqrele), garbage collection of
speculative preallocations (blockgc), reclamation of incore inodes
(reclaim), and deferred inactivation (inodegc).  Each of these four have
their own slightly different criteria for deciding if they want to
handle an inode, so it makes more sense to have four cohesive igrab
functions than one confusing parameteric grab function like we do now.

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