]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix recover_replicas() unfound check
authorSage Weil <sage@newdream.net>
Tue, 23 Nov 2010 21:32:49 +0000 (13:32 -0800)
committerSage Weil <sage@newdream.net>
Tue, 23 Nov 2010 21:52:22 +0000 (13:52 -0800)
missing_loc.count(soid) == 0 only means unfound if it's not missing on the
primary.

Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/PG.cc
src/osd/ReplicatedPG.cc

index b35a41574908d23c9c9e75c0a46b580a80b3e1da..4f4c96a692fee617f230beb464ffec8929ae7d72 100644 (file)
@@ -799,13 +799,12 @@ bool PG::is_all_uptodate() const
     int peer = *a;
     map<int, Missing>::const_iterator pm = peer_missing.find(peer);
     if (pm == peer_missing.end()) {
-      dout(10) << __func__ << ": osd " << peer << " is not up-to-date. We "
-              << "have no peer_missing information for this osd." << dendl;
+      dout(10) << __func__ << ": osd" << peer << " don't have missing set" << dendl;
       uptodate = false;
       continue;
     }
     if (pm->second.num_missing()) {
-      dout(10) << __func__ << ": osd " << peer << " has " << pm->second.num_missing() << " missing" << dendl;
+      dout(10) << __func__ << ": osd" << peer << " has " << pm->second.num_missing() << " missing" << dendl;
       uptodate = false;
     }
   }
index e323b9bf6225d749498d0ea12d864f52af346eb3..bf013c0ed29ffa1a7787dc41b883387a5047288a 100644 (file)
@@ -3816,14 +3816,14 @@ int ReplicatedPG::recover_replicas(int max)
        dout(10) << __func__ << ": already pushing " << soid << dendl;
        continue;
       }
-      if (missing_loc.find(soid) == missing_loc.end()) {
-       dout(10) << __func__ << ": " << soid << " is still unfound." << dendl;
-       continue;
-      }
       if (missing.is_missing(soid)) {
-       dout(10) << __func__ << ": still missing on primary " << soid << dendl;
+       if (missing_loc.find(soid) == missing_loc.end())
+         dout(10) << __func__ << ": " << soid << " still unfound" << dendl;
+       else
+         dout(10) << __func__ << ": " << soid << " still missing on primary" << dendl;
        continue;
       }
+
       dout(10) << __func__ << ": recover_object_replicas(" << soid << ")" << dendl;
       started += recover_object_replicas(soid);
     }