From: Sage Weil Date: Sat, 7 May 2011 20:22:06 +0000 (-0700) Subject: osd: simplify build_might_have_unfound X-Git-Tag: v0.28~47 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=70d8c994a1424f0545dda9d8ba31b2342fa17127;p=ceph.git osd: simplify build_might_have_unfound Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 046f75967698..3c3c2f3a7367 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1048,6 +1048,8 @@ bool PG::all_unfound_are_lost(const OSDMap* osdmap) const return false; } } + dout(10) << "all_unfound_are_lost all of might_have_unfound " << might_have_unfound + << " are marked lost!" << dendl; return true; } @@ -1392,7 +1394,8 @@ void PG::build_might_have_unfound() std::vector::const_iterator a = interval.acting.begin(); std::vector::const_iterator a_end = interval.acting.end(); for (; a != a_end; ++a) { - might_have_unfound.insert(*a); + if (*a != osd->whoami) + might_have_unfound.insert(*a); } } @@ -1402,10 +1405,6 @@ void PG::build_might_have_unfound() p++) might_have_unfound.insert(p->first); - // The objects which are unfound on the primary can't be found on the - // primary itself. - might_have_unfound.erase(osd->whoami); - dout(15) << __func__ << ": built " << might_have_unfound << dendl; }