[btree] use a block_ref_counter for internal nodes

This commit is contained in:
Joe Thornber
2013-06-20 14:27:40 +01:00
parent e89d81e318
commit 83a09e1a2a
8 changed files with 88 additions and 27 deletions

View File

@ -0,0 +1,28 @@
#include "persistent-data/data-structures/btree.h"
using namespace persistent_data;
//----------------------------------------------------------------
block_ref_counter::block_ref_counter(space_map::ptr sm)
: sm_(sm) {
}
void
block_ref_counter::set(block_address const &b, uint32_t rc) {
sm_->set_count(b, rc);
}
void
block_ref_counter::inc(block_address const &b) {
sm_->inc(b);
}
void
block_ref_counter::dec(block_address const &b) {
sm_->dec(b);
}
//----------------------------------------------------------------