summaryrefslogtreecommitdiff
tag nameinode-walk-cleanups-5.13_2021-03-25 (d335b85ace3aa137d383b2281b483917fd47e59c)
tag date2021-03-25 17:01:38 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 13da84326e...
xfs: clean up incore inode walk functions
This series reduces the number of indirect function calls when we want to iterate the incore inode radix tree, and reduces the number of arguments that must be passed to the walk function. I made a few observations about incore inode radix tree walks -- the one caller (blockgc) that cares about radix tree tags is internal to xfs_icache.c, and there's a 1:1 mapping between that tag and the iterator function. Furthermore, the only other caller (quotaoff) is the only caller to supply a nonzero flags argument, it never specifies a radix tree tag, and it only walks inodes that have VFS state. The first patch moves quotaoff to walk the vfs inode list to drop all attached dquots, which frees us to remove the iter_flags argument and the indirect function calls from xfs_inode_walk. Next, we merge the code that walks reclaimable inodes into xfs_inode_walk and refactor all the code that sets and clears the radix tree tags in the perag structure and the perag tree itself. This series is a prerequisite for the next patchset, since deferred inode inactivation will add another inode radix tree tag and iterator function to go with it. v2: walk the vfs inode list when running quotaoff instead of the radix tree, then rework the (now completely internal) inode walk function to take the tag as the main parameter. v3: merge the reclaim loop into xfs_inode_walk, then consolidate the radix tree tagging functions