We install negative entries instead.
Signed-off-by: Sage Weil <sage@redhat.com>
onode_map.clear();
}
-void BlueStore::OnodeHashLRU::remove(const ghobject_t& oid)
-{
- Mutex::Locker l(lock);
- ceph::unordered_map<ghobject_t,OnodeRef>::iterator p = onode_map.find(oid);
- if (p == onode_map.end()) {
- dout(30) << __func__ << " " << oid << " miss" << dendl;
- return;
- }
- dout(30) << __func__ << " " << oid << " hit " << p->second << dendl;
- lru_list_t::iterator pi = lru.iterator_to(*p->second);
- lru.erase(pi);
- onode_map.erase(p);
-}
-
void BlueStore::OnodeHashLRU::rename(const ghobject_t& old_oid,
const ghobject_t& new_oid)
{
void add(const ghobject_t& oid, OnodeRef o);
void _touch(OnodeRef o);
OnodeRef lookup(const ghobject_t& o);
- void remove(const ghobject_t& o);
void rename(const ghobject_t& old_oid, const ghobject_t& new_oid);
void clear();
bool get_next(const ghobject_t& after, pair<ghobject_t,OnodeRef> *next);