]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: recency should look at newest (not oldest) hitsets 7207/head
authorSage Weil <sage@redhat.com>
Wed, 25 Nov 2015 19:40:26 +0000 (14:40 -0500)
committerRobert LeBlanc <rdleblanc@bluehost.com>
Fri, 29 Jan 2016 16:29:19 +0000 (09:29 -0700)
Reported-by: xinxin shu <xinxin.shu@intel.com>
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 528eae92d010ea34ae8cf0e8b2290aaa5e058d24)

Conflicts:
src/osd/ReplicatedPG.cc
                    code section was moved to ReplicatedPG::maybe_promote
                    in master.
Signed-off-by: Robert LeBlanc <robert.leblanc@endurance.com>
src/osd/ReplicatedPG.cc

index bfaa16bb9b404a7f18a0137da70d1215c04ee3b8..897a77cc633aafb61533af10e4cf96319a786862 100644 (file)
@@ -1860,8 +1860,9 @@ bool ReplicatedPG::maybe_handle_cache(OpRequestRef op,
       if (count) {
        // Check if in other hit sets
        const hobject_t& oid = obc.get() ? obc->obs.oi.soid : missing_oid;
-       for (map<time_t,HitSetRef>::iterator itor = agent_state->hit_set_map.begin();
-            itor != agent_state->hit_set_map.end();
+       for (map<time_t,HitSetRef>::reverse_iterator itor =
+              agent_state->hit_set_map.rbegin();
+            itor != agent_state->hit_set_map.rend();
             ++itor) {
          if (!itor->second->contains(oid)) {
            break;