roots automatically get their ref count bumped now
This commit is contained in:
parent
90675d3a95
commit
19c7144b3b
@ -27,10 +27,8 @@ namespace persistent_data {
|
|||||||
count_map::iterator it = counts_.find(b);
|
count_map::iterator it = counts_.find(b);
|
||||||
if (it == counts_.end())
|
if (it == counts_.end())
|
||||||
counts_.insert(make_pair(b, 1));
|
counts_.insert(make_pair(b, 1));
|
||||||
#if 0
|
|
||||||
else
|
else
|
||||||
it->second++;
|
it->second++;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned get_count(block_address b) const {
|
unsigned get_count(block_address b) const {
|
||||||
|
@ -374,12 +374,10 @@ metadata::check()
|
|||||||
|
|
||||||
mapping_validator::ptr mv(new mapping_validator(metadata_counter,
|
mapping_validator::ptr mv(new mapping_validator(metadata_counter,
|
||||||
data_counter));
|
data_counter));
|
||||||
metadata_counter.inc(mappings_.get_root());
|
|
||||||
mappings_.visit(mv);
|
mappings_.visit(mv);
|
||||||
set<uint64_t> const &mapped_devs = mv->get_devices();
|
set<uint64_t> const &mapped_devs = mv->get_devices();
|
||||||
|
|
||||||
details_validator::ptr dv(new details_validator(metadata_counter));
|
details_validator::ptr dv(new details_validator(metadata_counter));
|
||||||
metadata_counter.inc(details_.get_root());
|
|
||||||
details_.visit(dv);
|
details_.visit(dv);
|
||||||
set<uint64_t> const &details_devs = dv->get_devices();
|
set<uint64_t> const &details_devs = dv->get_devices();
|
||||||
|
|
||||||
|
@ -245,7 +245,6 @@ namespace persistent_data {
|
|||||||
|
|
||||||
virtual void check(block_counter &counter) const {
|
virtual void check(block_counter &counter) const {
|
||||||
typename ref_count_validator<BlockSize>::ptr v(new ref_count_validator<BlockSize>(counter));
|
typename ref_count_validator<BlockSize>::ptr v(new ref_count_validator<BlockSize>(counter));
|
||||||
counter.inc(ref_counts_.get_root());
|
|
||||||
ref_counts_.visit(v);
|
ref_counts_.visit(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,7 +440,8 @@ namespace persistent_data {
|
|||||||
|
|
||||||
counter.inc(bitmap_root_);
|
counter.inc(bitmap_root_);
|
||||||
for (unsigned i = 0; i < entries_.size(); i++)
|
for (unsigned i = 0; i < entries_.size(); i++)
|
||||||
counter.inc(entries_[i].blocknr_);
|
if (entries_[i].blocknr_ != 0) // superblock
|
||||||
|
counter.inc(entries_[i].blocknr_);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user