]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: separate BLOCK_GROUP_TREE compat RO flag from EXTENT_TREE_V2
authorQu Wenruo <wqu@suse.com>
Tue, 9 Aug 2022 05:02:18 +0000 (13:02 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2022 10:28:00 +0000 (12:28 +0200)
commit40a1e436dc62de4e44858977029244f974f6d946
tree537eae5f087b048a45d08f0f5d4c620114783d50
parent2efb167bc9e87a8db3fc8dc0834b195b979632a4
btrfs: separate BLOCK_GROUP_TREE compat RO flag from EXTENT_TREE_V2

The problem of long mount time caused by block group item search is
already known for some time, and the solution of block group tree has
been proposed.

There is really no need to bound this feature into extent tree v2, just
introduce compat RO flag, BLOCK_GROUP_TREE, to correctly solve the
problem.

All the code handling block group root is already in the upstream
kernel, thus this patch really only needs to introduce the new compat RO
flag.

This patch introduces one extra artificial limitation on block group
tree feature, that free space cache v2 and no-holes feature must be
enabled to use this new compat RO feature.

This artificial requirement is mostly to reduce the test combinations,
and can be a guideline for future features, to mostly rely on the latest
default features.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/sysfs.c
include/uapi/linux/btrfs.h