]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: only discover_all_missing if unfound
authorSage Weil <sage@newdream.net>
Tue, 23 Nov 2010 21:16:20 +0000 (13:16 -0800)
committerSage Weil <sage@newdream.net>
Tue, 23 Nov 2010 21:52:22 +0000 (13:52 -0800)
Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/OSD.cc
src/osd/PG.cc

index a2d49f11a562da6ba31293d2ded8f563c9544e27..cd5a9b17ef258d57138d48b4602f441131f79b6a 100644 (file)
@@ -3906,10 +3906,10 @@ void OSD::_process_pg_info(epoch_t epoch, int from,
     // i am PRIMARY
     if (pg->is_active())  {
       // PG is ACTIVE
-      if (pg->have_unfound()) {
-       dout(10) << *pg << " searching osd" << from << " log for missing items." << dendl;
-       pg->search_for_missing(info, missing, from);
+      dout(10) << *pg << " searching osd" << from << " log for unfound items." << dendl;
+      pg->search_for_missing(info, missing, from);
 
+      if (pg->have_unfound()) {
        // Make sure we've requested MISSING information from every OSD
        // we know about.
        map< int, map<pg_t,PG::Query> > query_map;
index 6fa5af376c974dff0f5e99ae0736d63a0886e569..b35a41574908d23c9c9e75c0a46b580a80b3e1da 100644 (file)
@@ -1561,9 +1561,8 @@ void PG::do_peer(ObjectStore::Transaction& t, list<Context*>& tfin,
   else if (!is_active()) {
     // -- ok, activate!
     activate(t, tfin, activator_map);
-    if (missing.have_missing()) {
+    if (have_unfound())
       discover_all_missing(query_map);
-    }
   }
   else if (is_all_uptodate()) 
     finish_recovery(t, tfin);