From: Yuan Zhou Date: Fri, 21 Dec 2018 02:56:19 +0000 (+0800) Subject: tools: fix immutable obj cache max size X-Git-Tag: v15.0.0~136^2~52 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c4a3a3dba4682755e7746532ad6c70a1d1d90a0b;p=ceph-ci.git tools: fix immutable obj cache max size Signed-off-by: Yuan Zhou --- diff --git a/src/tools/immutable_object_cache/ObjectCacheStore.cc b/src/tools/immutable_object_cache/ObjectCacheStore.cc index e465f603a9a..0baa875ce19 100644 --- a/src/tools/immutable_object_cache/ObjectCacheStore.cc +++ b/src/tools/immutable_object_cache/ObjectCacheStore.cc @@ -20,14 +20,14 @@ ObjectCacheStore::ObjectCacheStore(CephContext *cct, ContextWQ* work_queue) : m_cct(cct), m_work_queue(work_queue), m_rados(new librados::Rados()), m_ioctxs_lock("ceph::cache::ObjectCacheStore::m_ioctxs_lock") { - object_cache_entries = + object_cache_max_size = m_cct->_conf.get_val("immutable_object_cache_max_size"); std::string cache_path = m_cct->_conf.get_val("immutable_object_cache_path"); m_cache_root_dir = cache_path + "/ceph_immutable_obj_cache/"; //TODO(): allow to set cache level - m_policy = new SimplePolicy(m_cct, object_cache_entries, 0.1); + m_policy = new SimplePolicy(m_cct, object_cache_max_size/(4096*1024), 0.1); } ObjectCacheStore::~ObjectCacheStore() { diff --git a/src/tools/immutable_object_cache/ObjectCacheStore.h b/src/tools/immutable_object_cache/ObjectCacheStore.h index e5f2475ca86..2db9f95e089 100644 --- a/src/tools/immutable_object_cache/ObjectCacheStore.h +++ b/src/tools/immutable_object_cache/ObjectCacheStore.h @@ -61,7 +61,7 @@ class ObjectCacheStore //TODO(): make this configurable int m_dir_num = 10; - uint64_t object_cache_entries; + uint64_t object_cache_max_size; std::string m_cache_root_dir; };