Skip to content

Commit

Permalink
dm thin metadata: remove unused dm_pool_get_data_block_size()
Browse files Browse the repository at this point in the history
The thin-pool target doesn't display the data block size as part of
its table status, unlike the dm-cache target, so there is no need for
dm_pool_get_data_block_size().

This was found using cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Rickard Strandqvist authored and Mike Snitzer committed Feb 9, 2015
1 parent 88e2f90 commit 9cb1397
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
9 changes: 0 additions & 9 deletions drivers/md/dm-thin-metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1635,15 +1635,6 @@ int dm_pool_get_metadata_dev_size(struct dm_pool_metadata *pmd,
return r;
}

int dm_pool_get_data_block_size(struct dm_pool_metadata *pmd, sector_t *result)
{
down_read(&pmd->root_lock);
*result = pmd->data_block_size;
up_read(&pmd->root_lock);

return 0;
}

int dm_pool_get_data_dev_size(struct dm_pool_metadata *pmd, dm_block_t *result)
{
int r = -EINVAL;
Expand Down
2 changes: 0 additions & 2 deletions drivers/md/dm-thin-metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ int dm_pool_get_free_metadata_block_count(struct dm_pool_metadata *pmd,
int dm_pool_get_metadata_dev_size(struct dm_pool_metadata *pmd,
dm_block_t *result);

int dm_pool_get_data_block_size(struct dm_pool_metadata *pmd, sector_t *result);

int dm_pool_get_data_dev_size(struct dm_pool_metadata *pmd, dm_block_t *result);

int dm_pool_block_is_used(struct dm_pool_metadata *pmd, dm_block_t b, bool *result);
Expand Down

0 comments on commit 9cb1397

Please sign in to comment.