]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: wait until we've build the missing set to discover_all_missing
authorSamuel Just <sam.just@inktank.com>
Thu, 28 Aug 2014 22:32:22 +0000 (15:32 -0700)
committerSamuel Just <sam.just@inktank.com>
Sun, 21 Sep 2014 17:04:19 +0000 (10:04 -0700)
Fixes: #9179
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 970d9830a3a6e8568337c660fb8b4c4a60a2b3bf)

Conflicts:
src/osd/PG.cc

src/osd/PG.cc

index 3e6d7070ec4d2be021ef5ea9d02aed91dfb82c0f..9a4d7c612d02c983f65412986bb80c2b24f8d345 100644 (file)
@@ -1487,12 +1487,6 @@ void PG::activate(ObjectStore::Transaction& t,
   } else {
     dout(10) << "activate - not complete, " << missing << dendl;
     pg_log.activate_not_complete(info);
-    if (is_primary()) {
-      dout(10) << "activate - starting recovery" << dendl;
-      osd->queue_for_recovery(this);
-      if (have_unfound())
-       discover_all_missing(query_map);
-    }
   }
     
   log_weirdness();
@@ -1655,6 +1649,11 @@ void PG::activate(ObjectStore::Transaction& t,
       }
 
       build_might_have_unfound();
+
+      dout(10) << "activate - starting recovery" << dendl;
+      osd->queue_for_recovery(this);
+      if (have_unfound())
+       discover_all_missing(query_map);
     }
 
     // degraded?