From: yingyil <ying...@google.com> Add an objectid parameter to make the function a general one for inserting root items and rename it to create_tree. The change cascades down to the callchain.
Signed-off-by: yingyil <ying...@google.com> --- v2: utilize create_tree() function for creating a subvolume, instead of create_subvol() in convert/main.c. mkfs/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mkfs/main.c b/mkfs/main.c index afd68bc5..869c11fa 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -320,13 +320,12 @@ static int create_raid_groups(struct btrfs_trans_handle *trans, return ret; } -static int create_data_reloc_tree(struct btrfs_trans_handle *trans, - struct btrfs_root *root) +static int create_tree(struct btrfs_trans_handle *trans, + struct btrfs_root *root, u64 objectid) { struct btrfs_key location; struct btrfs_root_item root_item; struct extent_buffer *tmp; - u64 objectid = BTRFS_DATA_RELOC_TREE_OBJECTID; int ret; ret = btrfs_copy_root(trans, root, root->node, &tmp, objectid); @@ -1846,7 +1845,7 @@ raid_groups: } } - ret = create_data_reloc_tree(trans, root); + ret = create_tree(trans, root, BTRFS_DATA_RELOC_TREE_OBJECTID); if (ret) { error("unable to create data reloc tree: %d", ret); goto out; -- 2.14.1.342.g6490525c54-goog -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html