• Josef Bacik's avatar
    btrfs: add support for multiple global roots · f7238e50
    Josef Bacik authored
    With extent tree v2 you will be able to create multiple csum, extent,
    and free space trees.  They will be used based on the block group, which
    will now use the block_group_item->chunk_objectid to point to the set of
    global roots that it will use.  When allocating new block groups we'll
    simply mod the gigabyte offset of the block group against the number of
    global roots we have and that will be the block groups global id.
    
    >From there we can take the bytenr that we're modifying in the respective
    tree, look up the block group and get that block groups corresponding
    global root id.  From there we can get to the appropriate global root
    for that bytenr.
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    f7238e50
block-group.c 121 KB