summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2017-06-13 17:19:35 +0800
committerDavid Sterba <dsterba@suse.com>2017-07-12 17:54:16 +0200
commit0544aafcbf48a8b70090cc515b9d130bac10554e (patch)
treeb1bc7119acb901369a07c584a88276df33b1e631 /volumes.c
parentd8814ff73e19fded3decde59b00c993116ffc120 (diff)
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 <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c8
1 files changed, 4 insertions, 4 deletions
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;