From: Yuan Zhou Date: Fri, 21 Dec 2018 01:20:07 +0000 (+0800) Subject: tools: remove background eviction X-Git-Tag: v15.0.0~136^2~54 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b3b915737c27cc487f13e240abcbb0048cd119da;p=ceph.git tools: remove background eviction do eviction check in promotion callback simply Signed-off-by: Yuan Zhou --- diff --git a/src/tools/immutable_object_cache/ObjectCacheStore.cc b/src/tools/immutable_object_cache/ObjectCacheStore.cc index 6b3dbae79dc69..63b742e148101 100644 --- a/src/tools/immutable_object_cache/ObjectCacheStore.cc +++ b/src/tools/immutable_object_cache/ObjectCacheStore.cc @@ -57,22 +57,12 @@ int ObjectCacheStore::init(bool reset) { efs::create_directories(m_cache_root_dir); } - evict_thd = new std::thread([this]{this->evict_thread_body();}); return ret; } -void ObjectCacheStore::evict_thread_body() { - int ret; - while(m_evict_go) { - ret = evict_objects(); - } -} - int ObjectCacheStore::shutdown() { ldout(m_cct, 20) << dendl; - m_evict_go = false; - evict_thd->join(); m_rados->shutdown(); return 0; } diff --git a/src/tools/immutable_object_cache/ObjectCacheStore.h b/src/tools/immutable_object_cache/ObjectCacheStore.h index d51ce326f3645..4b71e24a9677c 100644 --- a/src/tools/immutable_object_cache/ObjectCacheStore.h +++ b/src/tools/immutable_object_cache/ObjectCacheStore.h @@ -60,8 +60,6 @@ class ObjectCacheStore ObjectCacheFile *m_cache_file; Policy* m_policy; - std::thread* evict_thd; - bool m_evict_go = false; //TODO(): make this configurable int m_dir_num = 10;