]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: add and use helper to compute the available space for a block group
authorFilipe Manana <fdmanana@suse.com>
Thu, 15 Jan 2026 21:17:35 +0000 (21:17 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:51:44 +0000 (07:51 +0100)
commitc208aa0ef655bb9a3c379510802cadd0df512f0a
tree7976c9f497f6b4e12edba164435cf89ea25ec1aa
parentb322fa5ff1320430d9a8349cb57770a47399b690
btrfs: add and use helper to compute the available space for a block group

We have currently three places that compute how much available space a
block group has. Add a helper function for this and use it in those
places.

Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
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>
fs/btrfs/block-group.c
fs/btrfs/block-group.h
fs/btrfs/space-info.c