aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.c
diff options
context:
space:
mode:
authorJohannes Thumshirn <[email protected]>2024-02-21 15:35:52 +0000
committerDavid Sterba <[email protected]>2024-03-26 15:42:39 +0000
commita8b70c7f8600bc77d03c0b032c0662259b9e615e (patch)
treea1038505158bc94125182e9eb852f512d08f9865 /tools/lib/bpf/libbpf.c
parentbtrfs: use btrfs_warn() to log message at btrfs_add_extent_mapping() (diff)
downloadkernel-a8b70c7f8600bc77d03c0b032c0662259b9e615e.tar.gz
kernel-a8b70c7f8600bc77d03c0b032c0662259b9e615e.zip
btrfs: zoned: don't skip block groups with 100% zone unusable
Commit f4a9f219411f ("btrfs: do not delete unused block group if it may be used soon") changed the behaviour of deleting unused block-groups on zoned filesystems. Starting with this commit, we're using btrfs_space_info_used() to calculate the number of used bytes in a space_info. But btrfs_space_info_used() also accounts btrfs_space_info::bytes_zone_unusable as used bytes. So if a block group is 100% zone_unusable it is skipped from the deletion step. In order not to skip fully zone_unusable block-groups, also check if the block-group has bytes left that can be used on a zoned filesystem. Fixes: f4a9f219411f ("btrfs: do not delete unused block group if it may be used soon") CC: [email protected] # 6.1+ Reviewed-by: Filipe Manana <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
0 files changed, 0 insertions, 0 deletions