From 979e8b44d4208d962a4973221e7705596d94f7bc Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 14 Mar 2014 18:00:05 -0700 Subject: [PATCH] PG::build_might_have_unfound: check pg_whomai, not osd whoami Otherwise, we might skip (2,0) when we are (2,1). Fixes: #7732 Signed-off-by: Samuel Just --- src/osd/PG.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 3d290ff93ba5d..75fa59cfe7248 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1360,11 +1360,9 @@ void PG::build_might_have_unfound() std::vector::const_iterator a = interval.acting.begin(); std::vector::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); } } -- 2.39.5