From 622c5ac41707069ef8db92cb67c9185acf125d40 Mon Sep 17 00:00:00 2001 From: Zhiqiang Wang Date: Tue, 28 Oct 2014 09:37:11 +0800 Subject: [PATCH] osd: cache tiering: fix the atime logic of the eviction Reported-by: Xinze Chi Signed-off-by: Zhiqiang Wang --- src/osd/ReplicatedPG.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index dcef9a76ed90e..f669cd665e347 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -11657,8 +11657,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; } -- 2.39.5