]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: simplify build_might_have_unfound
authorSage Weil <sage.weil@dreamhost.com>
Sat, 7 May 2011 20:22:06 +0000 (13:22 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Mon, 9 May 2011 23:01:49 +0000 (16:01 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/PG.cc

index 046f75967698b869eb76216868e67c02a1e94b4e..3c3c2f3a7367ebeaea02fe905066a961e159d729 100644 (file)
@@ -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<int>::const_iterator a = interval.acting.begin();
     std::vector<int>::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;
 }