dm thin metadata: remove unused dm_thin_remove_block and __remove
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
8ca8b1e147
commit
75274a4bf2
|
@ -1665,22 +1665,6 @@ int dm_thin_insert_block(struct dm_thin_device *td, dm_block_t block,
|
|||
return r;
|
||||
}
|
||||
|
||||
static int __remove(struct dm_thin_device *td, dm_block_t block)
|
||||
{
|
||||
int r;
|
||||
struct dm_pool_metadata *pmd = td->pmd;
|
||||
dm_block_t keys[2] = { td->id, block };
|
||||
|
||||
r = dm_btree_remove(&pmd->info, pmd->root, keys, &pmd->root);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
td->mapped_blocks--;
|
||||
td->changed = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __remove_range(struct dm_thin_device *td, dm_block_t begin, dm_block_t end)
|
||||
{
|
||||
int r;
|
||||
|
@ -1740,18 +1724,6 @@ static int __remove_range(struct dm_thin_device *td, dm_block_t begin, dm_block_
|
|||
return dm_btree_insert(&pmd->tl_info, pmd->root, keys, &value, &pmd->root);
|
||||
}
|
||||
|
||||
int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block)
|
||||
{
|
||||
int r = -EINVAL;
|
||||
|
||||
pmd_write_lock(td->pmd);
|
||||
if (!td->pmd->fail_io)
|
||||
r = __remove(td, block);
|
||||
pmd_write_unlock(td->pmd);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
int dm_thin_remove_range(struct dm_thin_device *td,
|
||||
dm_block_t begin, dm_block_t end)
|
||||
{
|
||||
|
|
|
@ -166,7 +166,6 @@ int dm_pool_alloc_data_block(struct dm_pool_metadata *pmd, dm_block_t *result);
|
|||
int dm_thin_insert_block(struct dm_thin_device *td, dm_block_t block,
|
||||
dm_block_t data_block);
|
||||
|
||||
int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block);
|
||||
int dm_thin_remove_range(struct dm_thin_device *td,
|
||||
dm_block_t begin, dm_block_t end);
|
||||
|
||||
|
|
Loading…
Reference in New Issue