From 8de881935330edbc957108a17596db8157d7dae0 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 10 Mar 2014 13:36:37 -0700 Subject: [PATCH] PG::choose_acting: filter CRUSH_ITEM_NONE out of have Fixes: #7672 Signed-off-by: Samuel Just --- src/osd/PG.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index fe759efe142..94728f41aba 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1270,11 +1270,13 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id) boost::scoped_ptr recoverable_predicate( get_pgbackend()->get_is_recoverable_predicate()); set 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; -- 2.47.3