]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: cache tiering: fix the atime logic of the eviction 3949/head
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Tue, 28 Oct 2014 01:37:11 +0000 (09:37 +0800)
committerLoic Dachary <ldachary@redhat.com>
Wed, 11 Mar 2015 09:20:09 +0000 (10:20 +0100)
Reported-by: Xinze Chi <xmdxcxz@gmail.com>
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
(cherry picked from commit 622c5ac41707069ef8db92cb67c9185acf125d40)

src/osd/ReplicatedPG.cc

index f1911c13f947b5ebe2cbeffb19aaa755f3b0fc8a..046e07a755c86a9b7202ac410f6590450c2bc4cb 100644 (file)
@@ -11409,8 +11409,7 @@ bool ReplicatedPG::agent_maybe_evict(ObjectContextRef& obc)
 
     // FIXME: ignore temperature for now.
 
-    // KISS: if [lower,upper] spans our target effort, evict it.
-    if (atime_lower >= agent_state->evict_effort)
+    if (1000000 - atime_upper >= agent_state->evict_effort)
       return false;
   }