bool shared)
{
if (shared) {
- vector<bluestore_extent_t> release;
+ vector<bluestore_pextent_t> release;
if (!o->enode)
o->enode = c->get_enode(o->oid.hobj.get_hash());
o->enode->ref_map.put(offset, length, &release);
_check();
}
-void bluestore_extent_ref_map_t::put(uint64_t offset, uint32_t length,
- vector<bluestore_extent_t> *release)
+void bluestore_extent_ref_map_t::put(
+ uint64_t offset, uint32_t length,
+ vector<bluestore_pextent_t> *release)
{
map<uint64_t,record_t>::iterator p = ref_map.lower_bound(offset);
if (p == ref_map.end() || p->first > offset) {
--p->second.refs;
_maybe_merge_left(p);
} else {
- release->push_back(bluestore_extent_t(p->first, length));
+ release->push_back(bluestore_pextent_t(p->first, length));
ref_map.erase(p);
}
return;
_maybe_merge_left(p);
++p;
} else {
- release->push_back(bluestore_extent_t(p->first, p->second.length));
+ release->push_back(bluestore_pextent_t(p->first, p->second.length));
ref_map.erase(p++);
}
}
void add(uint64_t offset, uint32_t len, unsigned ref=2);
void get(uint64_t offset, uint32_t len);
- void put(uint64_t offset, uint32_t len, vector<bluestore_extent_t> *release);
+ void put(uint64_t offset, uint32_t len, vector<bluestore_pextent_t> *release);
bool contains(uint64_t offset, uint32_t len) const;
TEST(bluestore_extent_ref_map_t, put)
{
bluestore_extent_ref_map_t m;
- vector<bluestore_extent_t> r;
+ vector<bluestore_pextent_t> r;
m.add(10, 30, 1);
m.put(10, 30, &r);
cout << m << " " << r << std::endl;