btrfs-progs/mkfs
Qu Wenruo c5a21a7814 btrfs-progs: don't save block group root into super block
The extent tree v2 (thankfully not yet fully materialized) needs a
new root for storing all block group items.

My initial proposal years ago just added a new tree rootid, and load it
from tree root, just like what we did for quota/free space tree/uuid/extent
roots.

But the extent tree v2 patches introduced a completely new (and to me,
wasteful) way to store block group tree root into super block.

Currently there are only 3 trees stored in super blocks, and they all
have their valid reasons:

- Chunk root
  Needed for bootstrap.

- Tree root
  Really the entrance of all trees.

- Log root
  This is special as log root has to be updated out of existing
  transaction mechanism.

There is not even any reason to put block group root into super blocks,
the block group tree is updated at the same timing as old extent tree,
no need for extra bootstrap/out-of-transaction update.

So just move block group root from super block into tree root.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-09-12 15:31:27 +02:00
..
common.c btrfs-progs: don't save block group root into super block 2022-09-12 15:31:27 +02:00
common.h btrfs-progs: mkfs: dynamically modify mkfs blocks array 2022-09-12 15:31:26 +02:00
main.c btrfs-progs: add constant for initial getopt values 2022-08-16 15:18:11 +02:00
Makefile btrfs-progs: build: add stub makefile to image and mkfs 2019-07-04 15:36:01 +02:00
rootdir.c btrfs-progs: stop passing root to csum related functions 2021-11-22 21:45:37 +01:00
rootdir.h btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00