From 620733386bd0694960cecac8f32bd1538382d5bb 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 (cherry picked from commit 622c5ac41707069ef8db92cb67c9185acf125d40) --- 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 f1911c13f947b..046e07a755c86 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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; }