btrfs-progs: rename btrfs_alloc_free_block to btrfs_alloc_tree_block
This is in keeping with what the function actually does, and is named this way in the kernel. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
8e427ada49
commit
006baaecdd
|
@ -9096,7 +9096,7 @@ static struct extent_buffer *btrfs_fsck_clear_root(
|
|||
if (!path)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
c = btrfs_alloc_free_block(trans, gfs_info->tree_root,
|
||||
c = btrfs_alloc_tree_block(trans, gfs_info->tree_root,
|
||||
gfs_info->nodesize, key->objectid,
|
||||
&disk_key, 0, 0, 0);
|
||||
if (IS_ERR(c)) {
|
||||
|
|
|
@ -1146,7 +1146,7 @@ static int __rebuild_chunk_root(struct btrfs_trans_handle *trans,
|
|||
btrfs_set_disk_key_type(&disk_key, BTRFS_DEV_ITEM_KEY);
|
||||
btrfs_set_disk_key_offset(&disk_key, min_devid);
|
||||
|
||||
cow = btrfs_alloc_free_block(trans, root, root->fs_info->nodesize,
|
||||
cow = btrfs_alloc_tree_block(trans, root, root->fs_info->nodesize,
|
||||
BTRFS_CHUNK_TREE_OBJECTID,
|
||||
&disk_key, 0, 0, 0);
|
||||
btrfs_set_header_bytenr(cow, cow->start);
|
||||
|
|
|
@ -167,7 +167,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,
|
|||
btrfs_item_key(buf, &disk_key, 0);
|
||||
else
|
||||
btrfs_node_key(buf, &disk_key, 0);
|
||||
cow = btrfs_alloc_free_block(trans, new_root, buf->len,
|
||||
cow = btrfs_alloc_tree_block(trans, new_root, buf->len,
|
||||
new_root_objectid, &disk_key,
|
||||
level, buf->start, 0);
|
||||
if (IS_ERR(cow)) {
|
||||
|
@ -230,7 +230,7 @@ int btrfs_create_root(struct btrfs_trans_handle *trans,
|
|||
new_root->root_key.type = BTRFS_ROOT_ITEM_KEY;
|
||||
new_root->root_key.offset = 0;
|
||||
|
||||
node = btrfs_alloc_free_block(trans, new_root, fs_info->nodesize,
|
||||
node = btrfs_alloc_tree_block(trans, new_root, fs_info->nodesize,
|
||||
objectid, &disk_key, 0, 0, 0);
|
||||
if (IS_ERR(node)) {
|
||||
ret = PTR_ERR(node);
|
||||
|
@ -285,7 +285,7 @@ int btrfs_create_root(struct btrfs_trans_handle *trans,
|
|||
/*
|
||||
* Essential trees can't be created by this function, yet.
|
||||
* As we expect such skeleton exists, or a lot of functions like
|
||||
* btrfs_alloc_free_block() doesn't work at all
|
||||
* btrfs_alloc_tree_block() doesn't work at all
|
||||
*/
|
||||
case BTRFS_ROOT_TREE_OBJECTID:
|
||||
case BTRFS_EXTENT_TREE_OBJECTID:
|
||||
|
@ -461,7 +461,7 @@ int __btrfs_cow_block(struct btrfs_trans_handle *trans,
|
|||
else
|
||||
btrfs_node_key(buf, &disk_key, 0);
|
||||
|
||||
cow = btrfs_alloc_free_block(trans, root, buf->len,
|
||||
cow = btrfs_alloc_tree_block(trans, root, buf->len,
|
||||
root->root_key.objectid, &disk_key,
|
||||
level, search_start, empty_size);
|
||||
if (IS_ERR(cow))
|
||||
|
@ -1732,7 +1732,7 @@ static int noinline insert_new_root(struct btrfs_trans_handle *trans,
|
|||
else
|
||||
btrfs_node_key(lower, &lower_key, 0);
|
||||
|
||||
c = btrfs_alloc_free_block(trans, root, root->fs_info->nodesize,
|
||||
c = btrfs_alloc_tree_block(trans, root, root->fs_info->nodesize,
|
||||
root->root_key.objectid, &lower_key,
|
||||
level, root->node->start, 0);
|
||||
|
||||
|
@ -1858,7 +1858,7 @@ static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root
|
|||
mid = (c_nritems + 1) / 2;
|
||||
btrfs_node_key(c, &disk_key, mid);
|
||||
|
||||
split = btrfs_alloc_free_block(trans, root, root->fs_info->nodesize,
|
||||
split = btrfs_alloc_tree_block(trans, root, root->fs_info->nodesize,
|
||||
root->root_key.objectid,
|
||||
&disk_key, level, c->start, 0);
|
||||
if (IS_ERR(split))
|
||||
|
@ -2425,7 +2425,7 @@ again:
|
|||
else
|
||||
btrfs_item_key(l, &disk_key, mid);
|
||||
|
||||
right = btrfs_alloc_free_block(trans, root, root->fs_info->nodesize,
|
||||
right = btrfs_alloc_tree_block(trans, root, root->fs_info->nodesize,
|
||||
root->root_key.objectid,
|
||||
&disk_key, 0, l->start, 0);
|
||||
if (IS_ERR(right)) {
|
||||
|
|
|
@ -849,7 +849,7 @@ struct btrfs_block_group *btrfs_lookup_block_group(struct btrfs_fs_info *info,
|
|||
struct btrfs_block_group *btrfs_lookup_first_block_group(struct
|
||||
btrfs_fs_info *info,
|
||||
u64 bytenr);
|
||||
struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
|
||||
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
|
||||
struct btrfs_root *root,
|
||||
u32 blocksize, u64 root_objectid,
|
||||
struct btrfs_disk_key *key, int level,
|
||||
|
|
|
@ -2333,7 +2333,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
|
|||
btrfs_setup_root(root, fs_info, key->objectid);
|
||||
memcpy(&root->root_key, key, sizeof(struct btrfs_key));
|
||||
|
||||
leaf = btrfs_alloc_free_block(trans, root, fs_info->nodesize,
|
||||
leaf = btrfs_alloc_tree_block(trans, root, fs_info->nodesize,
|
||||
root->root_key.objectid, NULL, 0, 0, 0);
|
||||
if (IS_ERR(leaf)) {
|
||||
ret = PTR_ERR(leaf);
|
||||
|
|
|
@ -2554,7 +2554,7 @@ static int alloc_tree_block(struct btrfs_trans_handle *trans,
|
|||
* helper function to allocate a block for a given tree
|
||||
* returns the tree buffer or NULL.
|
||||
*/
|
||||
struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
|
||||
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
|
||||
struct btrfs_root *root,
|
||||
u32 blocksize, u64 root_objectid,
|
||||
struct btrfs_disk_key *key, int level,
|
||||
|
|
Loading…
Reference in a new issue