]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: include ourselves in the prior set
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 18 May 2011 23:44:05 +0000 (16:44 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Thu, 19 May 2011 00:04:17 +0000 (17:04 -0700)
All acting OSDs should be in the prior set, since any of them may have
the newest update.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/osd/PG.cc

index e76b57e2b311b52d8ba3b5f2c297d8cc0b67d7b3..07bd8f73d93c4f4ac62fb659625339dc8cef696a 100644 (file)
@@ -4309,6 +4309,9 @@ void PG::RecoveryState::GetInfo::get_infos()
        it != prior_set->cur.end();
        ++it) {
     int peer = *it;
+    if (peer == pg->osd->whoami) {
+      continue;
+    }
     if (pg->peer_info.count(peer)) {
       dout(10) << " have osd" << peer << " info " << pg->peer_info[peer] << dendl;
       continue;
@@ -4742,8 +4745,7 @@ PG::PgPriorSet::PgPriorSet(int whoami,
     if (up[i] != whoami)
       cur.insert(up[i]);
   for (unsigned i=0; i<acting.size(); i++)
-    if (acting[i] != whoami)
-      cur.insert(acting[i]);
+    cur.insert(acting[i]);
 
   // see if i have ever started since joining the pg.  this is important only
   // if we want to exclude lost osds.