]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: add and use helper to determine if using bitmaps in free space tree
authorFilipe Manana <fdmanana@suse.com>
Wed, 11 Jun 2025 17:10:24 +0000 (18:10 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:58:03 +0000 (23:58 +0200)
commitfdeffeb4f58797eb2ca3194a16eb1b49637ac0d4
treee7d3b7b91ddb9f597d3f2597c2dbc7eb849e8de2
parentd1ac35ae2a51e8f06360aa535b8d0f13800a0861
btrfs: add and use helper to determine if using bitmaps in free space tree

When adding and removing free space to the free space tree, we need to
lookup the respective block group's free info item in the free space tree,
check its flags for the BTRFS_FREE_SPACE_USING_BITMAPS bit and then
release the path.

Move these steps into a helper function and use it in both sites.
This will also help avoiding duplicate code in a subsequent change.

Reviewed-by: Boris Burkov <boris@bur.io>
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/free-space-tree.c