]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: requeue pg for recovery if we may have found someting
authorSage Weil <sage.weil@dreamhost.com>
Fri, 4 Mar 2011 22:00:02 +0000 (14:00 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 4 Mar 2011 22:00:02 +0000 (14:00 -0800)
If we get a peer log/missing and call search_for_missing, requeue the pg
for recovery so we can pull anything we may have just found.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/OSD.cc

index c4e037751fc150a74e1404894cab4a28501a3e37..669a912c1994c28f64aec59ea31a9fccd44849fb 100644 (file)
@@ -4228,16 +4228,15 @@ void OSD::_process_pg_info(epoch_t epoch, int from,
     // i am PRIMARY
     if (pg->is_active())  {
       // PG is ACTIVE
-      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.
-       pg->discover_all_missing(query_map);
-      }
-      else {
-       dout(10) << *pg << " ignoring osd" << from << " log, pg is already active" << dendl;
+      if (!pg->is_clean()) {
+       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.
+         pg->discover_all_missing(query_map);
+       }
+       queue_for_recovery(pg);  // in case we found something.
       }
     }
     else if ((!log.empty()) && missing) {