This patchset can be fetched from: https://github.com/adam900710/linux/tree/backref_cache_new Since it is based on previous btrfs_backref_iter facility, it's recommended to fetch from above repo. This patchset mostly refactors the backref handling code out of the bit loop in build_backref_cache(). Now build_backref_tree() can be easily divided into 4 small parts: - Basic structure allocation - Breadth-first search for backrefs - Handling edges of upper nodes - Removing useless nodes Qu Wenruo (3): btrfs: relocation: Use wrapper to replace open-coded edge linking btrfs: relocation: Specify essential members for alloc_backref_node() btrfs: relocation: Remove the open-coded goto loop for breadth-first search fs/btrfs/relocation.c | 241 ++++++++++++++++++++++++------------------ 1 file changed, 138 insertions(+), 103 deletions(-) -- 2.25.1
