diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-12-15 15:40:07 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-03-14 13:13:48 +0100 |
commit | 9c54e80ddc6bd89596a4046d451908700476fd14 (patch) | |
tree | 7406cc32c6f47a3abd5c539121d21c4eb53a7f92 /fs/btrfs/disk-io.h | |
parent | bd676446c138882003e4d470a518c219f3184354 (diff) |
btrfs: add code to support the block group root
This code adds the on disk structures for the block group root, which
will hold the block group items for extent tree v2.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r-- | fs/btrfs/disk-io.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index 5e8bef4b7563..2e10514ecda8 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h @@ -111,6 +111,8 @@ static inline struct btrfs_root *btrfs_grab_root(struct btrfs_root *root) static inline struct btrfs_root *btrfs_block_group_root(struct btrfs_fs_info *fs_info) { + if (btrfs_fs_incompat(fs_info, EXTENT_TREE_V2)) + return fs_info->block_group_root; return btrfs_extent_root(fs_info, 0); } |