]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::choose_acting: filter CRUSH_ITEM_NONE out of have 1418/head
authorSamuel Just <sam.just@inktank.com>
Mon, 10 Mar 2014 20:36:37 +0000 (13:36 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 10 Mar 2014 20:36:39 +0000 (13:36 -0700)
Fixes: #7672
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc

index fe759efe1422fb28105c5869ce1fb5831d0b387b..94728f41abaa008a8bf0237be4adce020cb4feb8 100644 (file)
@@ -1270,11 +1270,13 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id)
   boost::scoped_ptr<PGBackend::IsRecoverablePredicate> recoverable_predicate(
     get_pgbackend()->get_is_recoverable_predicate());
   set<pg_shard_t> have;
-  for (int i = 0; i < (int)want.size(); ++i)
-    have.insert(
-      pg_shard_t(
-       want[i],
-       pool.info.ec_pool() ? i : ghobject_t::NO_SHARD));
+  for (int i = 0; i < (int)want.size(); ++i) {
+    if (want[i] != CRUSH_ITEM_NONE)
+      have.insert(
+       pg_shard_t(
+         want[i],
+         pool.info.ec_pool() ? i : ghobject_t::NO_SHARD));
+  }
   if (!(*recoverable_predicate)(have)) {
     want_acting.clear();
     return false;