]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: insert new onode to the front position of onode LRU 7492/head
authorJianjian Huo <samuel.huo@gmail.com>
Wed, 3 Feb 2016 05:19:37 +0000 (00:19 -0500)
committerJianjian Huo <samuel.huo@gmail.com>
Wed, 3 Feb 2016 05:19:37 +0000 (00:19 -0500)
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>
src/os/bluestore/BlueStore.cc

index d0a1451ae68adfe2d9e75c411926e0b7d8d4716c..f0542d05ee6b06b79416a043b2af6a56ec2e127b 100644 (file)
@@ -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)