From 836f72a166a482a7b84dcdecb7987412a4f3dca1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 4 Mar 2011 09:38:47 -0800 Subject: [PATCH] osd: discover more missing if unfound and do_recovery can't start anything 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 --- src/osd/OSD.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 14e6d1ebe94b4..50465c08bcbe5 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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 > query_map; + pg->discover_all_missing(query_map); + do_queries(query_map); + } + if (started < max) pg->recovery_item.remove_myself(); -- 2.39.5