diff options
author | Qu Wenruo <wqu@suse.com> | 2020-03-10 09:14:15 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-03-23 17:01:57 +0100 |
commit | 19b546d7a1b2eaf575d04a8434e32f679877c45e (patch) | |
tree | 837cb62b93ebf533043397fe984726feef1278c1 /samples | |
parent | btrfs: fix ref-verify to catch operations on 0 ref extents (diff) | |
download | linux-19b546d7a1b2eaf575d04a8434e32f679877c45e.tar.xz linux-19b546d7a1b2eaf575d04a8434e32f679877c45e.zip |
btrfs: relocation: Use btrfs_find_all_leafs to locate data extent parent tree leaves
In relocation, we need to locate all parent tree leaves referring to one
data extent, thus we have a complex mechanism to iterate throught extent
tree and subvolume trees to locate the related leaves.
However this is already done in backref.c, we have
btrfs_find_all_leafs(), which can return a ulist containing all leaves
referring to that data extent.
Use btrfs_find_all_leafs() to replace find_data_references().
There is a special handling for v1 space cache data extents, where we
need to delete the v1 space cache data extents, to avoid those data
extents to hang the data relocation.
In this patch, the special handling is done by re-iterating the root
tree leaf. Although it's a little less efficient than the old handling,
considering we can reuse a lot of code, it should be acceptable.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions