[thin] fix duplicated counting of mapped blocks in restore emitter
This commit is contained in:
parent
702a38f438
commit
6863db6f86
@ -322,7 +322,7 @@ namespace persistent_data {
|
||||
maybe_pair lookup_le(key const &key) const;
|
||||
maybe_pair lookup_ge(key const &key) const;
|
||||
|
||||
void insert(key const &key, typename ValueTraits::value_type const &value);
|
||||
bool insert(key const &key, typename ValueTraits::value_type const &value);
|
||||
void remove(key const &key);
|
||||
|
||||
void set_root(block_address root);
|
||||
|
@ -498,7 +498,7 @@ namespace persistent_data {
|
||||
}
|
||||
|
||||
template <unsigned Levels, typename ValueTraits>
|
||||
void
|
||||
bool
|
||||
btree<Levels, ValueTraits>::
|
||||
insert(key const &key,
|
||||
typename ValueTraits::value_type const &value)
|
||||
@ -531,6 +531,8 @@ namespace persistent_data {
|
||||
n.set_value(index, value);
|
||||
|
||||
root_ = spine.get_root();
|
||||
|
||||
return need_insert;
|
||||
}
|
||||
|
||||
template <unsigned Levels, typename ValueTraits>
|
||||
|
@ -136,10 +136,9 @@ namespace {
|
||||
mapping_tree_detail::block_time bt;
|
||||
bt.block_ = data_block;
|
||||
bt.time_ = time;
|
||||
current_mapping_->insert(key, bt);
|
||||
current_device_details_.mapped_blocks_ +=
|
||||
static_cast<uint64_t>(current_mapping_->insert(key, bt));
|
||||
md_->data_sm_->inc(data_block);
|
||||
|
||||
current_device_details_.mapped_blocks_ += 1;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -50,7 +50,7 @@ thin::lookup(block_address thin_block)
|
||||
return pool_->md_->mappings_->lookup(key);
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
thin::insert(block_address thin_block, block_address data_block)
|
||||
{
|
||||
uint64_t key[2] = {dev_, thin_block};
|
||||
|
@ -39,7 +39,7 @@ namespace thin_provisioning {
|
||||
|
||||
thin_dev_t get_dev_t() const;
|
||||
maybe_address lookup(block_address thin_block);
|
||||
void insert(block_address thin_block, block_address data_block);
|
||||
bool insert(block_address thin_block, block_address data_block);
|
||||
void remove(block_address thin_block);
|
||||
|
||||
void set_snapshot_time(uint32_t time);
|
||||
|
Loading…
Reference in New Issue
Block a user