OSDN Git Service

btrfs: reloc: refactor indirect tree backref processing into its own function
authorQu Wenruo <wqu@suse.com>
Thu, 5 Mar 2020 06:22:43 +0000 (14:22 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:17 +0000 (11:25 +0200)
commit4d81ea8bb4fc40903f4950b082955c709d785467
tree5daf5da5bb1dce144b22c422cffa2f0bbbe2b381
parent4007ea87d900e20a7986cdcdcfdc866e8f8bd473
btrfs: reloc: refactor indirect tree backref processing into its own function

The processing of indirect tree backref (TREE_BLOCK_REF) is the most
complex work.

We need to grab the fs root, do a tree search to locate all its parent
nodes, link all needed edges, and put all uncached edges to pending edge
list.

This is definitely worth a helper function.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c