From 0544aafcbf48a8b70090cc515b9d130bac10554e Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Tue, 13 Jun 2017 17:19:35 +0800 Subject: btrfs-progs: Refactor chunk creation functions to use btrfs_fs_info 4 functions are involved in this refactor: btrfs_make_block_group() btrfs_make_block_groups(), btrfs_alloc_chunk, btrfs_alloc_data_chunk(). Signed-off-by: Qu Wenruo Signed-off-by: David Sterba --- volumes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'volumes.c') diff --git a/volumes.c b/volumes.c index 2c1bb62e..79dad244 100644 --- a/volumes.c +++ b/volumes.c @@ -833,11 +833,11 @@ error: / sizeof(struct btrfs_stripe) + 1) int btrfs_alloc_chunk(struct btrfs_trans_handle *trans, - struct btrfs_root *extent_root, u64 *start, + struct btrfs_fs_info *info, u64 *start, u64 *num_bytes, u64 type) { u64 dev_offset; - struct btrfs_fs_info *info = extent_root->fs_info; + struct btrfs_root *extent_root = info->extent_root; struct btrfs_root *chunk_root = info->chunk_root; struct btrfs_stripe *stripes; struct btrfs_device *device = NULL; @@ -1099,11 +1099,11 @@ again: * occupied. */ int btrfs_alloc_data_chunk(struct btrfs_trans_handle *trans, - struct btrfs_root *extent_root, u64 *start, + struct btrfs_fs_info *info, u64 *start, u64 num_bytes, u64 type, int convert) { u64 dev_offset; - struct btrfs_fs_info *info = extent_root->fs_info; + struct btrfs_root *extent_root = info->extent_root; struct btrfs_root *chunk_root = info->chunk_root; struct btrfs_stripe *stripes; struct btrfs_device *device = NULL; -- cgit v1.2.3