diff options
author | Filipe Manana <fdmanana@suse.com> | 2022-11-01 17:15:48 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:50 +0100 |
commit | 1baea6f18abf34037169d3b0c585356abb395376 (patch) | |
tree | f0028743045c3e55dff4d78580155587fb916407 /fs/btrfs/ulist.c | |
parent | btrfs: use a structure to pass arguments to backref walking functions (diff) | |
download | linux-1baea6f18abf34037169d3b0c585356abb395376.tar.xz linux-1baea6f18abf34037169d3b0c585356abb395376.zip |
btrfs: reuse roots ulist on each leaf iteration for iterate_extent_inodes()
At iterate_extent_inodes() we collect a ulist of leaves for a given extent
with a call to btrfs_find_all_leafs() and then we enter a loop where we
iterate over all the collected leaves. Each iteration of that loop does a
call to btrfs_find_all_roots_safe(), to determine all roots from which a
leaf is accessible, and that results in allocating and releasing a ulist
to store the root IDs.
Instead of allocating and releasing the roots ulist on every iteration,
allocate a ulist before entering the loop and keep using it on each
iteration, reinitializing the ulist at the end of each iteration.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ulist.c')
0 files changed, 0 insertions, 0 deletions