From 2494d59303b1da72118b13ed50cfb5a62fa376e5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 4 Mar 2011 14:00:02 -0800 Subject: [PATCH] osd: requeue pg for recovery if we may have found someting 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 --- src/osd/OSD.cc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index c4e037751fc15..669a912c1994c 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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) { -- 2.39.5