thin-provisioning-tools/space_map.cc
2011-11-08 11:08:16 +00:00

24 lines
438 B
C++

#include "space_map.h"
using namespace persistent_data;
//----------------------------------------------------------------
sm_decrementer::sm_decrementer(space_map::ptr sm, block_address b)
: sm_(sm),
b_(b),
released_(false) {
}
sm_decrementer::~sm_decrementer() {
if (!released_)
sm_->dec(b_);
}
void
sm_decrementer::dont_bother() {
released_ = true;
}
//----------------------------------------------------------------