Skip to content

Commit

Permalink
os/bluestore: insert new onode to the front position of onode LRU
Browse files Browse the repository at this point in the history
When new added onode comes, it should go to the front of the LRU,
since it's least recently used.

Signed-off-by: Jianjian Huo <samuel.huo@gmail.com>
  • Loading branch information
jjhuo committed Feb 3, 2016
1 parent 06cecb4 commit caed882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os/bluestore/BlueStore.cc
Expand Up @@ -495,7 +495,7 @@ void BlueStore::OnodeHashLRU::add(const ghobject_t& oid, OnodeRef o)
dout(30) << __func__ << " " << oid << " " << o << dendl;
assert(onode_map.count(oid) == 0);
onode_map[oid] = o;
lru.push_back(*o);
lru.push_front(*o);
}

BlueStore::OnodeRef BlueStore::OnodeHashLRU::lookup(const ghobject_t& oid)
Expand Down

0 comments on commit caed882

Please sign in to comment.