]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: remove remapped block groups from the free-space-tree
authorMark Harmstone <mark@harmstone.com>
Wed, 7 Jan 2026 14:09:04 +0000 (14:09 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:54:34 +0000 (07:54 +0100)
commit76377db18a8fb96511b09643e407fe3f9b0a9357
tree5c1e6a705a3968525e099bced86ae1d2c1a305ba
parentc3d6dda60c9da79a108592b14560e326384dbf4e
btrfs: remove remapped block groups from the free-space-tree

No new allocations can be done from block groups that have the REMAPPED
flag set, so there's no value in their having entries in the free-space
tree.

Prevent a search through the free-space tree being scheduled for such a
block group, and prevent any additions to the in-memory free-space tree.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c
fs/btrfs/free-space-cache.c