]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: reloc: refactor direct tree backref processing into its own function
authorQu Wenruo <wqu@suse.com>
Thu, 5 Mar 2020 06:06:29 +0000 (14:06 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:17 +0000 (11:25 +0200)
commitadeb3e11bb8e4065bb0435e2f73a2f59002f46cd
tree2374d8e2be9d502584eaa98730b31b820299291a
parent2c75a745c112b2b77c780237a86677070cfd0c79
btrfs: reloc: refactor direct tree backref processing into its own function

For BTRFS_SHARED_BLOCK_REF_KEY, its processing is straightforward, as we
now the parent node bytenr directly.

If the parent is already cached, or a root, call it a day.
If the parent is not cached, add it pending list.

This patch will just refactor this part into its own function,
handle_direct_tree_backref() and add some comment explaining the
@ref_key parameter.

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