summaryrefslogtreecommitdiff
tag nameinode-walk-cleanups-5.14_2021-06-05 (f5638ebbdcb4d1aaf9ed9c2bc42251386c432744)
tag date2021-06-05 15:16:57 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit c076ae7a93...
xfs: clean up incore inode walk functions
This ambitious series aims to cleans up redundant inode walk code in xfs_icache.c, hide implementation details of the quotaoff dquot release code, and eliminates indirect function calls from incore inode walks. The first thing it does is to move all the code that quotaoff calls to release dquots from all incore inodes into xfs_icache.c. Next, it separates the goal of an inode walk from the actual radix tree tags that may or may not be involved and drops the kludgy XFS_ICI_NO_TAG thing. Finally, we split the speculative preallocation (blockgc) and quotaoff dquot release code paths into separate functions so that we can keep the implementations cohesive. Christoph suggested last cycle that we 'simply' change quotaoff not to allow deactivating quota entirely, but as these cleanups are to enable one major change in behavior (deferred inode inactivation) I do not want to add a second behavior change (quotaoff) as a dependency. To be blunt: Additional cleanups are not in scope for this series. Next, I made two observations about incore inode radix tree walks -- since there's a 1:1 mapping between the walk goal and the per-inode processing function passed in, we can use the goal to make a direct call to the processing function. Furthermore, the only caller to supply a nonzero iter_flags argument is quotaoff, and there's only one INEW flag. From that observation, I concluded that it's quite possible to remove two parameters from the xfs_inode_walk* function signatures -- the iter_flags, and the execute function pointer. The middle of the series moves the INEW functionality into the one piece (quotaoff) that wants it, and removes the indirect calls. The final observation is that the inode reclaim walk loop is now almost the same as xfs_inode_walk, so it's silly to maintain two copies. Merge the reclaim loop code into xfs_inode_walk. Lastly, refactor the per-ag radix tagging functions since there's duplicated code that can be consolidated. This series is a prerequisite for the next two patchsets, since deferred inode inactivation will add another inode radix tree tag and iterator function to xfs_inode_walk. 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 v4: rebase to 5.13-rc4 v5: combine with the quotaoff patchset, reorder functions to minimize forward declarations, split inode walk goals from radix tree tags to reduce conceptual confusion v6: start moving the inode cache code towards the xfs_icwalk prefix -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmC799kACgkQ+H93GTRK tOt1mA/9FDFNIvNO101sdn3PJDGgn41w77hc9q2+aXoqtthXiq8HDXUKP9X2UMRX y+A8DTjNUGRd2plJHmUDfz77E/3daj0f7/3jeOyb0G22gNfzTmGZTay9ysAkF2TW C/JbONlYEIot4pe2ufYNRh/5ALPnw4m5s55uAjf+imUUff6Cc+djnISZuALghVSn JjeXTYM8ehutEt3NLdQPtAc/W1FrLS4ZGFSsq/d0gvE8G7UUL1XyiQ25kYM7qXyc BfBgRtyl/mifN4DfyUS0v62UPKq33Mlk09Ec2PcgoADal/ZGszRTCWFdO3PmHzt6 VYbdwjWJgFGe4Nml7HGyfFNLvxkEgO4hZru6DeQgEEGYZ6KWN2vzRG4qRXOgu97n xlb0awp086m+8iOKYnW5zMUZjVnvXc708dkLyVnsu22PxKomVwoAzZP03gL2aL5A D9bBG6Xemv7eN/dy8ClOIafLbXDtUidFp2DQcCEkILzBlYZnCaJb2Jdc3plZkB/b 8NO7fKz6CySgu11E4H8xZIK4PHmYL6Klw2eE/mLXEvmUsyHeoHgEXqXs9xA7jbP7 RWgH4pSKVUsXxi9OPEncvJv66R18PcpFNqwjg4xGDu56a/5cZmsWGBlGek+x2oQO B/6qS7e0OufOPzslcHWJGQeOYAC0z7JTqVUPUNdRyL3SN8o180c= =0mqk -----END PGP SIGNATURE-----