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 <xie.xingguo@zte.com.cn>
This commit is contained in:
xie xingguo 2016-07-18 16:08:08 +08:00
parent 9397819522
commit 012f8f9eb6

View 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()