Skip to content

btrfs: relocation: build_backref_cache() refactor part 2

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: relocation: Use wrapper to replace open-coded edge linkingfs/btrfs/relocation.c+37 -161 reply
2/3btrfs: relocation: Specify essential members for alloc_backref_node()fs/btrfs/relocation.c+12 -131 reply
3/3btrfs: relocation: Remove the open-coded goto loop for breadth-first searchfs/btrfs/relocation.c+90 -753 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchJosef Bacik
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] btrfs: relocation: build_backref_cache() refactor part 2

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(-)
Signature · 1 line
2.25.1