From 70d8c994a1424f0545dda9d8ba31b2342fa17127 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 7 May 2011 13:22:06 -0700 Subject: [PATCH] osd: simplify build_might_have_unfound Signed-off-by: Sage Weil --- src/osd/PG.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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; } -- 2.47.3