]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: track the csum, extent, and free space trees in a rb tree
authorJosef Bacik <josef@toxicpanda.com>
Fri, 5 Nov 2021 20:45:51 +0000 (16:45 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Jan 2022 14:09:50 +0000 (15:09 +0100)
commit3094ab68e68e8b4e40994850bced1c5b08568f5c
tree29786ead465fab93bcd5bbe5ae4cec7fd02cb8d6
parent67b6632d60d2ab3de23df0a899495e472bed0abb
btrfs: track the csum, extent, and free space trees in a rb tree

In the future we are going to have multiple copies of these trees.  To
facilitate this we need a way to lookup the different roots we are
looking for.  Handle this by adding a global root rb tree that is
indexed on the root->root_key.  Then instead of loading the roots at
mount time with individually targeted keys, simply search the tree_root
for anything with the specific objectid we want.  This will make it
straightforward to support both old style and new style file systems.

Signed-off-by: Josef Bacik <josef@toxicpanda.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/extent-tree.c
fs/btrfs/free-space-tree.c
fs/btrfs/tests/btrfs-tests.c
fs/btrfs/tests/free-space-tests.c
fs/btrfs/tests/free-space-tree-tests.c
fs/btrfs/tests/qgroup-tests.c