From: Sage Weil Date: Sun, 5 Dec 2010 05:28:55 +0000 (-0800) Subject: osd: search for unfound on osds in might_have_unfound X-Git-Tag: v0.24~57 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=27b70eb57bdcb1f3ccd57683fdc6f3e64c8f6db7;p=ceph.git 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 --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 2627fdc0f07a..22a095476595 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; }