assert(num == 1);
}
o->get(); // paranoia
- o->c->onode_map.onode_map.erase(o->oid);
+ o->c->onode_map.remove(o->oid);
o->put();
--num;
}
assert(num == 1);
}
o->get(); // paranoia
- o->c->onode_map.onode_map.erase(o->oid);
+ o->c->onode_map.remove(o->oid);
o->put();
--num;
}
};
struct OnodeSpace {
+ private:
Cache *cache;
/// forward lookups
mempool::bluestore_meta_other::unordered_map<ghobject_t,OnodeRef> onode_map;
+ public:
OnodeSpace(Cache *c) : cache(c) {}
~OnodeSpace() {
clear();
OnodeRef add(const ghobject_t& oid, OnodeRef o);
OnodeRef lookup(const ghobject_t& o);
+ void remove(const ghobject_t& oid) {
+ onode_map.erase(oid);
+ }
void rename(OnodeRef& o, const ghobject_t& old_oid,
const ghobject_t& new_oid,
const mempool::bluestore_meta_other::string& new_okey);