Commit e4ff5fb5 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove unused parameters from volume.c functions

This also adjusts the respective callers in other files. Those were
found with -Wunused-parameter.

btrfs_full_stripe_len's mapping_tree - introduced by 53b381b3
("Btrfs: RAID5 and RAID6") but it was never really used even in that
commit

btrfs_is_parity_mirror's mirror_num - same as above

chunk_drange_filter's chunk_offset - introduced by 94e60d5a ("Btrfs:
devid subset filter") and never used.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 110840bb
...@@ -9944,9 +9944,7 @@ btrfs_create_block_group_cache(struct btrfs_fs_info *fs_info, ...@@ -9944,9 +9944,7 @@ btrfs_create_block_group_cache(struct btrfs_fs_info *fs_info,
cache->key.type = BTRFS_BLOCK_GROUP_ITEM_KEY; cache->key.type = BTRFS_BLOCK_GROUP_ITEM_KEY;
cache->fs_info = fs_info; cache->fs_info = fs_info;
cache->full_stripe_len = btrfs_full_stripe_len(fs_info, cache->full_stripe_len = btrfs_full_stripe_len(fs_info, start);
&fs_info->mapping_tree,
start);
set_free_space_tree_thresholds(cache); set_free_space_tree_thresholds(cache);
atomic_set(&cache->count, 1); atomic_set(&cache->count, 1);
......
...@@ -1997,7 +1997,7 @@ int repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start, ...@@ -1997,7 +1997,7 @@ int repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start,
* read repair operation. * read repair operation.
*/ */
btrfs_bio_counter_inc_blocked(fs_info); btrfs_bio_counter_inc_blocked(fs_info);
if (btrfs_is_parity_mirror(fs_info, logical, length, mirror_num)) { if (btrfs_is_parity_mirror(fs_info, logical, length)) {
/* /*
* Note that we don't use BTRFS_MAP_WRITE because it's supposed * Note that we don't use BTRFS_MAP_WRITE because it's supposed
* to update all raid stripes, but here we just want to correct * to update all raid stripes, but here we just want to correct
......
...@@ -3305,7 +3305,6 @@ static int chunk_devid_filter(struct extent_buffer *leaf, ...@@ -3305,7 +3305,6 @@ static int chunk_devid_filter(struct extent_buffer *leaf,
/* [pstart, pend) */ /* [pstart, pend) */
static int chunk_drange_filter(struct extent_buffer *leaf, static int chunk_drange_filter(struct extent_buffer *leaf,
struct btrfs_chunk *chunk, struct btrfs_chunk *chunk,
u64 chunk_offset,
struct btrfs_balance_args *bargs) struct btrfs_balance_args *bargs)
{ {
struct btrfs_stripe *stripe; struct btrfs_stripe *stripe;
...@@ -3432,7 +3431,7 @@ static int should_balance_chunk(struct btrfs_fs_info *fs_info, ...@@ -3432,7 +3431,7 @@ static int should_balance_chunk(struct btrfs_fs_info *fs_info,
/* drange filter, makes sense only with devid filter */ /* drange filter, makes sense only with devid filter */
if ((bargs->flags & BTRFS_BALANCE_ARGS_DRANGE) && if ((bargs->flags & BTRFS_BALANCE_ARGS_DRANGE) &&
chunk_drange_filter(leaf, chunk, chunk_offset, bargs)) { chunk_drange_filter(leaf, chunk, bargs)) {
return 0; return 0;
} }
...@@ -5128,7 +5127,6 @@ int btrfs_num_copies(struct btrfs_fs_info *fs_info, u64 logical, u64 len) ...@@ -5128,7 +5127,6 @@ int btrfs_num_copies(struct btrfs_fs_info *fs_info, u64 logical, u64 len)
} }
unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info, unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,
struct btrfs_mapping_tree *map_tree,
u64 logical) u64 logical)
{ {
struct extent_map *em; struct extent_map *em;
...@@ -5146,8 +5144,7 @@ unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info, ...@@ -5146,8 +5144,7 @@ unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,
return len; return len;
} }
int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info, int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info, u64 logical, u64 len)
u64 logical, u64 len, int mirror_num)
{ {
struct extent_map *em; struct extent_map *em;
struct map_lookup *map; struct map_lookup *map;
......
...@@ -481,9 +481,8 @@ void btrfs_init_dev_replace_tgtdev_for_resume(struct btrfs_fs_info *fs_info, ...@@ -481,9 +481,8 @@ void btrfs_init_dev_replace_tgtdev_for_resume(struct btrfs_fs_info *fs_info,
struct btrfs_device *tgtdev); struct btrfs_device *tgtdev);
void btrfs_scratch_superblocks(struct block_device *bdev, const char *device_path); void btrfs_scratch_superblocks(struct block_device *bdev, const char *device_path);
int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info, int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info,
u64 logical, u64 len, int mirror_num); u64 logical, u64 len);
unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info, unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,
struct btrfs_mapping_tree *map_tree,
u64 logical); u64 logical);
int btrfs_finish_chunk_alloc(struct btrfs_trans_handle *trans, int btrfs_finish_chunk_alloc(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info, struct btrfs_fs_info *fs_info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment