summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ulist.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2022-11-01 17:15:48 +0100
committerDavid Sterba <dsterba@suse.com>2022-12-05 18:00:50 +0100
commit1baea6f18abf34037169d3b0c585356abb395376 (patch)
treef0028743045c3e55dff4d78580155587fb916407 /fs/btrfs/ulist.c
parentbtrfs: use a structure to pass arguments to backref walking functions (diff)
downloadlinux-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