From 012f8f9eb693319f1a35052e214e4287304fbf1f Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Mon, 18 Jul 2016 16:08:08 +0800 Subject: [PATCH] os/bluestore: trim cache on collection_list() too Currently we trim cache on all other read operations other than this one. Signed-off-by: xie xingguo --- src/os/bluestore/BlueStore.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index af987e1f837..27ad90685c5 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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() -- 2.39.5