From 27b70eb57bdcb1f3ccd57683fdc6f3e64c8f6db7 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 4 Dec 2010 21:28:55 -0800 Subject: [PATCH] osd: search for unfound on osds in might_have_unfound We were looking at 'up', which is just the set of OSDs we should be on in the current epoch; nothing to do with where the objects might be found. Signed-off-by: Sage Weil --- src/osd/PG.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 2627fdc0f07ac..22a095476595b 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -584,36 +584,36 @@ void PG::discover_all_missing(map< int, map > &query_map) << get_num_unfound() << " unfound" << dendl; - std::vector::const_iterator u = up.begin(); - std::vector::const_iterator end = up.end(); - std::set::const_iterator mhend = might_have_unfound.end(); - for (; u != end; ++u) { - int peer(*u); - if (might_have_unfound.find(peer) == mhend) { - dout(25) << __func__ << ": osd" << peer - << " is not in might_have_unfound" << dendl; + std::set::const_iterator m = might_have_unfound.begin(); + std::set::const_iterator mend = might_have_unfound.end(); + for (; m != mend; ++m) { + int peer(*m); + + if (!osd->osdmap->is_up(peer)) { + dout(20) << __func__ << " skipping down osd" << peer << dendl; continue; } + // If we've requested any of this stuff, the Missing information // should be on its way. // TODO: coalsce requested_* into a single data structure if (peer_missing.find(peer) != peer_missing.end()) { - dout(25) << __func__ << ": osd" << peer + dout(20) << __func__ << ": osd" << peer << ": we already have Missing" << dendl; continue; } if (peer_log_requested.find(peer) != peer_log_requested.end()) { - dout(25) << __func__ << ": osd" << peer + dout(20) << __func__ << ": osd" << peer << ": in peer_log_requested" << dendl; continue; } if (peer_backlog_requested.find(peer) != peer_backlog_requested.end()) { - dout(25) << __func__ << ": osd" << peer + dout(20) << __func__ << ": osd" << peer << ": in peer_backlog_requested" << dendl; continue; } if (peer_missing_requested.find(peer) != peer_missing_requested.end()) { - dout(25) << __func__ << ": osd" << peer + dout(20) << __func__ << ": osd" << peer << ": in peer_missing_requested" << dendl; continue; } -- 2.39.5