thin-provisioning-tools/space_map.cc

24 lines
438 B
C++
Raw Normal View History

2011-11-08 16:38:16 +05:30
#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;
}
//----------------------------------------------------------------