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: v11.0.1~411^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=200cae8c9db99b3dede377f74413cc0b15033e1f;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 --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 79a5da866d39..82e64c51ffc5 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2546,11 +2546,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 {