From: Samuel Just Date: Thu, 11 Aug 2016 15:57:51 +0000 (-0700) Subject: PG: use upset rather than up for _update_calc_stats X-Git-Tag: v10.2.4~54^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=58b7c52db2df0105aea3fbc36a0b2bc0d299415f;p=ceph.git PG: use upset rather than up for _update_calc_stats Fixes: http://tracker.ceph.com/issues/16998 Signed-off-by: Samuel Just (cherry picked from commit 200cae8c9db99b3dede377f74413cc0b15033e1f) --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 69331a5243ac..3b9d5a3cd9d0 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2553,11 +2553,11 @@ void PG::_update_calc_stats() // a misplaced object is not stored on the correct OSD uint64_t misplaced = 0; - unsigned i = 0; unsigned in_place = 0; - for (vector::iterator p = up.begin(); p != up.end(); ++p, ++i) { - pg_shard_t s(*p, - pool.info.ec_pool() ? shard_id_t(i) : shard_id_t::NO_SHARD); + for (set::const_iterator p = upset.begin(); + p != upset.end(); + ++p) { + const pg_shard_t &s = *p; if (actingset.count(s)) { ++in_place; } else {