Merge branch 'era' of github.com:jthornber/thin-provisioning-tools into era

This commit is contained in:
Joe Thornber
2014-01-08 10:50:26 +00:00
20 changed files with 460 additions and 19 deletions

View File

@ -46,6 +46,10 @@ namespace persistent_data {
return array_.get_root();
}
unsigned get_nr_bits() const {
return nr_bits_;
}
void grow(unsigned new_nr_bits, bool default_value) {
pad_last_block(default_value);
resize_array(new_nr_bits, default_value);
@ -184,7 +188,7 @@ namespace persistent_data {
if (n >= nr_bits_) {
std::ostringstream str;
str << "bitset index out of bounds ("
<< n << " >= " << nr_bits_ << endl;
<< n << " >= " << nr_bits_ << ")";
throw runtime_error(str.str());
}
}
@ -214,6 +218,12 @@ persistent_data::bitset::get_root() const
return impl_->get_root();
}
unsigned
bitset::get_nr_bits() const
{
return impl_->get_nr_bits();
}
void
persistent_data::bitset::grow(unsigned new_nr_bits, bool default_value)
{