]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: trim cache on collection_list() too
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 18 Jul 2016 08:08:08 +0000 (16:08 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 18 Jul 2016 08:08:42 +0000 (16:08 +0800)
Currently we trim cache on all other read operations
other than this one.

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

index af987e1f837df1190f73b8643043ffaa2831a6b4..27ad90685c5d215b0097b18420518059a0fbd0d5 100644 (file)
@@ -4074,6 +4074,9 @@ int BlueStore::collection_list(
     *pnext = ghobject_t::get_max();
   }
  out:
+  c->cache->trim(
+    g_conf->bluestore_onode_cache_size,
+    g_conf->bluestore_buffer_cache_size);
   dout(10) << __func__ << " " << c->cid
           << " start " << start << " end " << end << " max " << max
           << " = " << r << ", ls.size() = " << ls->size()