btrfs: Remove fs_info argument from convert_free_space_to_bitmaps
This function already takes a transaction handle which contains a reference to fs_info. So use that and remove the extra argument. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
f3f7277995
commit
719fb4de55
|
@ -177,10 +177,10 @@ static void le_bitmap_set(unsigned long *map, unsigned int start, int len)
|
||||||
}
|
}
|
||||||
|
|
||||||
int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans,
|
int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_fs_info *fs_info,
|
|
||||||
struct btrfs_block_group_cache *block_group,
|
struct btrfs_block_group_cache *block_group,
|
||||||
struct btrfs_path *path)
|
struct btrfs_path *path)
|
||||||
{
|
{
|
||||||
|
struct btrfs_fs_info *fs_info = trans->fs_info;
|
||||||
struct btrfs_root *root = fs_info->free_space_root;
|
struct btrfs_root *root = fs_info->free_space_root;
|
||||||
struct btrfs_free_space_info *info;
|
struct btrfs_free_space_info *info;
|
||||||
struct btrfs_key key, found_key;
|
struct btrfs_key key, found_key;
|
||||||
|
@ -477,8 +477,7 @@ static int update_free_space_extent_count(struct btrfs_trans_handle *trans,
|
||||||
|
|
||||||
if (!(flags & BTRFS_FREE_SPACE_USING_BITMAPS) &&
|
if (!(flags & BTRFS_FREE_SPACE_USING_BITMAPS) &&
|
||||||
extent_count > block_group->bitmap_high_thresh) {
|
extent_count > block_group->bitmap_high_thresh) {
|
||||||
ret = convert_free_space_to_bitmaps(trans, fs_info, block_group,
|
ret = convert_free_space_to_bitmaps(trans, block_group, path);
|
||||||
path);
|
|
||||||
} else if ((flags & BTRFS_FREE_SPACE_USING_BITMAPS) &&
|
} else if ((flags & BTRFS_FREE_SPACE_USING_BITMAPS) &&
|
||||||
extent_count < block_group->bitmap_low_thresh) {
|
extent_count < block_group->bitmap_low_thresh) {
|
||||||
ret = convert_free_space_to_extents(trans, fs_info, block_group,
|
ret = convert_free_space_to_extents(trans, fs_info, block_group,
|
||||||
|
|
|
@ -43,7 +43,6 @@ int __remove_from_free_space_tree(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_block_group_cache *block_group,
|
struct btrfs_block_group_cache *block_group,
|
||||||
struct btrfs_path *path, u64 start, u64 size);
|
struct btrfs_path *path, u64 start, u64 size);
|
||||||
int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans,
|
int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_fs_info *fs_info,
|
|
||||||
struct btrfs_block_group_cache *block_group,
|
struct btrfs_block_group_cache *block_group,
|
||||||
struct btrfs_path *path);
|
struct btrfs_path *path);
|
||||||
int convert_free_space_to_extents(struct btrfs_trans_handle *trans,
|
int convert_free_space_to_extents(struct btrfs_trans_handle *trans,
|
||||||
|
|
|
@ -137,7 +137,7 @@ static int check_free_space_extents(struct btrfs_trans_handle *trans,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = convert_free_space_to_bitmaps(trans, fs_info, cache, path);
|
ret = convert_free_space_to_bitmaps(trans, cache, path);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
test_msg("Could not convert to bitmaps\n");
|
test_msg("Could not convert to bitmaps\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -498,8 +498,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bitmaps) {
|
if (bitmaps) {
|
||||||
ret = convert_free_space_to_bitmaps(&trans, root->fs_info,
|
ret = convert_free_space_to_bitmaps(&trans, cache, path);
|
||||||
cache, path);
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
test_msg("Could not convert block group to bitmaps\n");
|
test_msg("Could not convert block group to bitmaps\n");
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in New Issue