]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/kstore: insert new onode to the front position of onode LRU 7505/head
authorxiexingguo <258156334@qq.com>
Wed, 3 Feb 2016 14:41:49 +0000 (22:41 +0800)
committerxiexingguo <258156334@qq.com>
Wed, 3 Feb 2016 14:41:49 +0000 (22:41 +0800)
See https://github.com/jjhuo/ceph/commit/caed88264d77f860376d4213cc98309a5daf3af2 for detail information.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/kstore/KStore.cc

index d3d9b92b257092af07a184cb3c705b41cfcef7d7..d19aa76d51d6cdd9078b95e57a36f0ceb5e9e672 100644 (file)
@@ -439,7 +439,7 @@ void KStore::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);
 }
 
 KStore::OnodeRef KStore::OnodeHashLRU::lookup(const ghobject_t& oid)