mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
synced 2025-09-15 00:56:46 +10:00
btrfs: rename add_new_free_space() to btrfs_add_new_free_space()
Since add_new_free_space() is exported, used outside block-group.c, rename it to include the 'btrfs_' prefix. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
28f6089490
commit
3b9f0995d8
@ -516,8 +516,8 @@ static void fragment_free_space(struct btrfs_block_group *block_group)
|
|||||||
*
|
*
|
||||||
* Returns 0 on success or < 0 on error.
|
* Returns 0 on success or < 0 on error.
|
||||||
*/
|
*/
|
||||||
int add_new_free_space(struct btrfs_block_group *block_group, u64 start, u64 end,
|
int btrfs_add_new_free_space(struct btrfs_block_group *block_group, u64 start,
|
||||||
u64 *total_added_ret)
|
u64 end, u64 *total_added_ret)
|
||||||
{
|
{
|
||||||
struct btrfs_fs_info *info = block_group->fs_info;
|
struct btrfs_fs_info *info = block_group->fs_info;
|
||||||
u64 extent_start, extent_end, size;
|
u64 extent_start, extent_end, size;
|
||||||
@ -806,8 +806,8 @@ next:
|
|||||||
key.type == BTRFS_METADATA_ITEM_KEY) {
|
key.type == BTRFS_METADATA_ITEM_KEY) {
|
||||||
u64 space_added;
|
u64 space_added;
|
||||||
|
|
||||||
ret = add_new_free_space(block_group, last, key.objectid,
|
ret = btrfs_add_new_free_space(block_group, last,
|
||||||
&space_added);
|
key.objectid, &space_added);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
total_found += space_added;
|
total_found += space_added;
|
||||||
@ -828,7 +828,7 @@ next:
|
|||||||
path->slots[0]++;
|
path->slots[0]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = add_new_free_space(block_group, last,
|
ret = btrfs_add_new_free_space(block_group, last,
|
||||||
block_group->start + block_group->length,
|
block_group->start + block_group->length,
|
||||||
NULL);
|
NULL);
|
||||||
out:
|
out:
|
||||||
@ -2326,7 +2326,7 @@ static int read_one_block_group(struct btrfs_fs_info *info,
|
|||||||
btrfs_free_excluded_extents(cache);
|
btrfs_free_excluded_extents(cache);
|
||||||
} else if (cache->used == 0) {
|
} else if (cache->used == 0) {
|
||||||
cache->cached = BTRFS_CACHE_FINISHED;
|
cache->cached = BTRFS_CACHE_FINISHED;
|
||||||
ret = add_new_free_space(cache, cache->start,
|
ret = btrfs_add_new_free_space(cache, cache->start,
|
||||||
cache->start + cache->length, NULL);
|
cache->start + cache->length, NULL);
|
||||||
btrfs_free_excluded_extents(cache);
|
btrfs_free_excluded_extents(cache);
|
||||||
if (ret)
|
if (ret)
|
||||||
@ -2774,7 +2774,7 @@ struct btrfs_block_group *btrfs_make_block_group(struct btrfs_trans_handle *tran
|
|||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = add_new_free_space(cache, chunk_offset, chunk_offset + size, NULL);
|
ret = btrfs_add_new_free_space(cache, chunk_offset, chunk_offset + size, NULL);
|
||||||
btrfs_free_excluded_extents(cache);
|
btrfs_free_excluded_extents(cache);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
btrfs_put_block_group(cache);
|
btrfs_put_block_group(cache);
|
||||||
|
@ -291,7 +291,7 @@ int btrfs_cache_block_group(struct btrfs_block_group *cache, bool wait);
|
|||||||
void btrfs_put_caching_control(struct btrfs_caching_control *ctl);
|
void btrfs_put_caching_control(struct btrfs_caching_control *ctl);
|
||||||
struct btrfs_caching_control *btrfs_get_caching_control(
|
struct btrfs_caching_control *btrfs_get_caching_control(
|
||||||
struct btrfs_block_group *cache);
|
struct btrfs_block_group *cache);
|
||||||
int add_new_free_space(struct btrfs_block_group *block_group,
|
int btrfs_add_new_free_space(struct btrfs_block_group *block_group,
|
||||||
u64 start, u64 end, u64 *total_added_ret);
|
u64 start, u64 end, u64 *total_added_ret);
|
||||||
struct btrfs_trans_handle *btrfs_start_trans_remove_block_group(
|
struct btrfs_trans_handle *btrfs_start_trans_remove_block_group(
|
||||||
struct btrfs_fs_info *fs_info,
|
struct btrfs_fs_info *fs_info,
|
||||||
|
@ -1517,8 +1517,10 @@ static int load_free_space_bitmaps(struct btrfs_caching_control *caching_ctl,
|
|||||||
} else if (prev_bit == 1 && bit == 0) {
|
} else if (prev_bit == 1 && bit == 0) {
|
||||||
u64 space_added;
|
u64 space_added;
|
||||||
|
|
||||||
ret = add_new_free_space(block_group, extent_start,
|
ret = btrfs_add_new_free_space(block_group,
|
||||||
offset, &space_added);
|
extent_start,
|
||||||
|
offset,
|
||||||
|
&space_added);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
total_found += space_added;
|
total_found += space_added;
|
||||||
@ -1533,7 +1535,7 @@ static int load_free_space_bitmaps(struct btrfs_caching_control *caching_ctl,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (prev_bit == 1) {
|
if (prev_bit == 1) {
|
||||||
ret = add_new_free_space(block_group, extent_start, end, NULL);
|
ret = btrfs_add_new_free_space(block_group, extent_start, end, NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
extent_count++;
|
extent_count++;
|
||||||
@ -1590,8 +1592,9 @@ static int load_free_space_extents(struct btrfs_caching_control *caching_ctl,
|
|||||||
ASSERT(key.type == BTRFS_FREE_SPACE_EXTENT_KEY);
|
ASSERT(key.type == BTRFS_FREE_SPACE_EXTENT_KEY);
|
||||||
ASSERT(key.objectid < end && key.objectid + key.offset <= end);
|
ASSERT(key.objectid < end && key.objectid + key.offset <= end);
|
||||||
|
|
||||||
ret = add_new_free_space(block_group, key.objectid,
|
ret = btrfs_add_new_free_space(block_group, key.objectid,
|
||||||
key.objectid + key.offset, &space_added);
|
key.objectid + key.offset,
|
||||||
|
&space_added);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
total_found += space_added;
|
total_found += space_added;
|
||||||
|
Loading…
Reference in New Issue
Block a user