]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
tools: fix immutable obj cache max size
authorYuan Zhou <yuan.zhou@intel.com>
Fri, 21 Dec 2018 02:56:19 +0000 (10:56 +0800)
committerYuan Zhou <yuan.zhou@intel.com>
Thu, 21 Mar 2019 16:16:26 +0000 (00:16 +0800)
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
src/tools/immutable_object_cache/ObjectCacheStore.cc
src/tools/immutable_object_cache/ObjectCacheStore.h

index e465f603a9a6f5d0a291b529a16af6dc10acd863..0baa875ce197fee74df325faf08683be4e467670 100644 (file)
@@ -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<Option::size_t>("immutable_object_cache_max_size");
 
   std::string cache_path = m_cct->_conf.get_val<std::string>("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() {
index e5f2475ca86c79ac10f33afb36cfb6ea7c1f8b5e..2db9f95e08900daee203f15e7783d30abba0f622 100644 (file)
@@ -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;
 };