diff options
author | Boris Burkov <boris@bur.io> | 2025-03-06 03:30:24 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-03-18 22:35:51 +0300 |
commit | 0497dfba98c00edbc7af12d53c0b1138eb318bf7 (patch) | |
tree | d7e4ec07b3327451987b9a35e2d6def274cb0678 /tools/perf/scripts/python/task-analyzer.py | |
parent | 7cbce3cb4c5cfffd8b08f148e2136afc1ec1ba94 (diff) | |
download | linux-0497dfba98c00edbc7af12d53c0b1138eb318bf7.tar.xz |
btrfs: codify pattern for adding block_group to bg_list
Similar to mark_bg_unused() and mark_bg_to_reclaim(), we have a few
places that use bg_list with refcounting, mostly for retrying failures
to reclaim/delete unused.
These have custom logic for handling locking and refcounting the bg_list
properly, but they actually all want to do the same thing, so pull that
logic out into a helper. Unfortunately, mark_bg_unused() does still need
the NEW flag to avoid prematurely marking stuff unused (even if refcount
is fine, we don't want to mess with bg creation), so it cannot use the
new helper.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions