]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::build_might_have_unfound: check pg_whomai, not osd whoami 1468/head
authorSamuel Just <sam.just@inktank.com>
Sat, 15 Mar 2014 01:00:05 +0000 (18:00 -0700)
committerSamuel Just <sam.just@inktank.com>
Sat, 15 Mar 2014 01:00:09 +0000 (18:00 -0700)
Otherwise, we might skip (2,0) when we are (2,1).

Fixes: #7732
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc

index 3d290ff93ba5d74531664211a427dbe5a8a9d5ff..75fa59cfe7248e4c9b6d5a4230cd239896f5f5f1 100644 (file)
@@ -1360,11 +1360,9 @@ 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, ++i) {
-      if (*a != CRUSH_ITEM_NONE && *a != osd->whoami)
-       might_have_unfound.insert(
-         pg_shard_t(
-           *a,
-           pool.info.ec_pool() ? i : ghobject_t::NO_SHARD));
+      pg_shard_t shard(*a, pool.info.ec_pool() ? i : ghobject_t::NO_SHARD);
+      if (*a != CRUSH_ITEM_NONE && shard != pg_whoami)
+       might_have_unfound.insert(shard);
     }
   }