summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2021-11-05 21:45:36 +0100
committerDavid Sterba <dsterba@suse.com>2022-01-03 15:09:47 +0100
commitdfe8aec4520bff8e69c8704421ef7f47c65ca778 (patch)
treeff53ef7a123ce4bbfe552c44f6b54d17e4738d9c /fs/btrfs/disk-io.h
parentbtrfs: remove BUG_ON(!eie) in find_parent_nodes (diff)
downloadlinux-dfe8aec4520bff8e69c8704421ef7f47c65ca778.tar.xz
linux-dfe8aec4520bff8e69c8704421ef7f47c65ca778.zip
btrfs: add a btrfs_block_group_root() helper
With extent tree v2 we will have a separate root to hold the block group items. Add a btrfs_block_group_root() that will return the appropriate root given the flags of the fs, and convert all functions that need to modify block group items to use the helper. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r--fs/btrfs/disk-io.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h
index a2b5db4ba262..baca29523d35 100644
--- a/fs/btrfs/disk-io.h
+++ b/fs/btrfs/disk-io.h
@@ -103,6 +103,11 @@ static inline struct btrfs_root *btrfs_grab_root(struct btrfs_root *root)
return NULL;
}
+static inline struct btrfs_root *btrfs_block_group_root(struct btrfs_fs_info *fs_info)
+{
+ return fs_info->extent_root;
+}
+
void btrfs_put_root(struct btrfs_root *root);
void btrfs_mark_buffer_dirty(struct extent_buffer *buf);
int btrfs_buffer_uptodate(struct extent_buffer *buf, u64 parent_transid,