Skip to content

Commit

Permalink
btrfs: remove unused btrfs_is_parity_mirror()
Browse files Browse the repository at this point in the history
btrfs_is_parity_mirror() has been unused since commit 4886ff7
("btrfs: introduce a new helper to submit write bio for repair").
Remove it as the code was refactored and we don't need the helper
anymore.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Dr. David Alan Gilbert authored and David Sterba committed Nov 11, 2024
1 parent 004641b commit 441ffe8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
18 changes: 0 additions & 18 deletions fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -5963,24 +5963,6 @@ unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,
return len;
}

int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info, u64 logical, u64 len)
{
struct btrfs_chunk_map *map;
int ret = 0;

if (!btrfs_fs_incompat(fs_info, RAID56))
return 0;

map = btrfs_get_chunk_map(fs_info, logical, len);

if (!WARN_ON(IS_ERR(map))) {
if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK)
ret = 1;
btrfs_free_chunk_map(map);
}
return ret;
}

static int find_live_mirror(struct btrfs_fs_info *fs_info,
struct btrfs_chunk_map *map, int first,
int dev_replace_is_ongoing)
Expand Down
2 changes: 0 additions & 2 deletions fs/btrfs/volumes.h
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,6 @@ int btrfs_run_dev_stats(struct btrfs_trans_handle *trans);
void btrfs_rm_dev_replace_remove_srcdev(struct btrfs_device *srcdev);
void btrfs_rm_dev_replace_free_srcdev(struct btrfs_device *srcdev);
void btrfs_destroy_dev_replace_tgtdev(struct btrfs_device *tgtdev);
int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info,
u64 logical, u64 len);
unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,
u64 logical);
u64 btrfs_calc_stripe_length(const struct btrfs_chunk_map *map);
Expand Down

0 comments on commit 441ffe8

Please sign in to comment.