Because if there are mutiple atime in agent_state for the same object, we should use the recently one.
Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
(cherry picked from commit
1fef4c3d541cba360738437420ebfa2447d5802e)
return;
}
time_t now = ceph_clock_now(NULL).sec();
- for (map<time_t,HitSetRef>::iterator p = agent_state->hit_set_map.begin();
- p != agent_state->hit_set_map.end();
+ for (map<time_t,HitSetRef>::iterator p = agent_state->hit_set_map.rbegin();
+ p != agent_state->hit_set_map.rend();
++p) {
if (p->second->contains(oid)) {
if (*atime < 0)