]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: discover more missing if unfound and do_recovery can't start anything
authorSage Weil <sage.weil@dreamhost.com>
Fri, 4 Mar 2011 17:38:47 +0000 (09:38 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 4 Mar 2011 17:38:47 +0000 (09:38 -0800)
If we couldn't start any recovery ops and things are still
unfound, see if we can discover more missing object locations.
It may be that our initial locations were bad and we errored
out while trying to pull.

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

index 14e6d1ebe94b4d82f5234591f1a3957a4c51fdc0..50465c08bcbe5a8e3de572e5b21513abc0b90d0f 100644 (file)
@@ -4936,7 +4936,19 @@ void OSD::do_recovery(PG *pg)
     dout(10) << "do_recovery started " << started
             << " (" << recovery_ops_active << "/" << g_conf.osd_recovery_max_active << " rops) on "
             << *pg << dendl;
-    
+
+    /*
+     * if we couldn't start any recovery ops and things are still
+     * unfound, see if we can discover more missing object locations.
+     * It may be that our initial locations were bad and we errored
+     * out while trying to pull.
+     */
+    if (!started && pg->have_unfound()) {
+      map< int, map<pg_t,PG::Query> > query_map;
+      pg->discover_all_missing(query_map);
+      do_queries(query_map);
+    }
+
     if (started < max)
       pg->recovery_item.remove_myself();