]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: use upset rather than up for _update_calc_stats 10688/head
authorSamuel Just <sjust@redhat.com>
Thu, 11 Aug 2016 15:57:51 +0000 (08:57 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 16 Aug 2016 16:44:38 +0000 (09:44 -0700)
Fixes: http://tracker.ceph.com/issues/16998
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PG.cc

index 79a5da866d39f17adf5f4cdc9d7bea3318c5d7e8..82e64c51ffc56fd17a308fd8c645f1adddfc9153 100644 (file)
@@ -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<int>::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<pg_shard_t>::const_iterator p = upset.begin();
+        p != upset.end();
+        ++p) {
+      const pg_shard_t &s = *p;
       if (actingset.count(s)) {
        ++in_place;
       } else {