diff options
author | Filipe Manana <fdmanana@suse.com> | 2024-10-17 18:23:41 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-11-11 16:34:19 +0300 |
commit | 22a0ae1889c6a5cd1f03de7e5f6c64646e782fd8 (patch) | |
tree | bce0b4832d87aa5745ac48d090227b5189baebdc /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 00f529661baaae79dc9de79f9273324b9e1f3542 (diff) | |
download | linux-22a0ae1889c6a5cd1f03de7e5f6c64646e782fd8.tar.xz |
btrfs: move btrfs_destroy_delayed_refs() to delayed-ref.c
It's better suited at delayed-ref.c since it's about delayed refs and
contains logic to iterate over them (using the red black tree, doing all
the locking, freeing, etc), so move it from disk-io.c, which is pretty
big, into delayed-ref.c, hiding implementation details of how delayed
refs are tracked and managed. This also facilitates the next patches in
the series.
This change moves the code between files but also does the following
simple cleanups:
1) Rename the 'cache' variable to 'bg', since it's a block group
(the 'cache' logic comes from old days where the block group
structure was named 'btrfs_block_group_cache');
2) Move the 'ref' variable declaration to the scope of the inner
while loop, since it's not used outside that loop.
Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions