[cache_*] array ref_counter wasn't overloaded correctly.

Major bug, explains some space map issues I've seen when
restoring cache metadata.
This commit is contained in:
Joe Thornber 2020-04-08 12:19:55 +01:00
parent 8db3800e2c
commit 501299a4ee

View File

@ -112,17 +112,17 @@ namespace persistent_data {
a_(a) {
}
virtual void set(uint64_t b, uint32_t rc) {
virtual void set(uint64_t const &b, uint32_t rc) {
sm_->set_count(b, rc);
if (rc == 0)
dec_values(b);
}
virtual void inc(uint64_t b) {
virtual void inc(uint64_t const &b) {
sm_->inc(b);
}
virtual void dec(uint64_t b) {
virtual void dec(uint64_t const &b) {
sm_->dec(b);
if (sm_->get_count(b) == 0)
dec_values(b);