diff options
| author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2026-09-09 08:47:25 +0200 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-11-09 18:50:57 +0100 |
| commit | 5e79f39fbeea78703ac389c67a810406fa09bc94 (patch) | |
| tree | 7989f70e4d1c12827e366d16b630a4dabd8d999f /tools/perf/scripts/python/flamegraph.py | |
| parent | 8c66a6aa59a5df1d672d72b7cd379d897ff73200 (diff) | |
btrfs: zoned: only change active zone counter on successful (de)activation
btrfs_zone_activate() unconditionally decrements the reserved_active_zones
counter regardless if btrfs_dev_set_active_zone() fails to set the zone
active, i.e. because it raced with another call that already set the bit
in the bitmask, or not.
This can lead to a double decrement of the counter in case the bit has
already been set.
Only decrement the counter *iff* btrfs_dev_set_active_zone() successfully
marked the zone in the bitmap.
Mirror this behaviour when clearing the bit again.
Fixes: a7e1ac7bdc5a ("btrfs: zoned: reserve zones for an active metadata/system block group")
Reviewed-by: Daniel Vacek <neelx@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
