]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: introduce and maintain upset
authorSamuel Just <sjust@redhat.com>
Thu, 11 Aug 2016 15:57:35 +0000 (08:57 -0700)
committerLoic Dachary <ldachary@redhat.com>
Fri, 26 Aug 2016 06:52:38 +0000 (08:52 +0200)
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 80a5c21d97116e7a66351a0e1f5d9b561f8663ac)

src/osd/PG.h

index 10a81f8336f662af47db0c07a11f79ffc2d0bd79..bc1926037ae71027ea6b0be73c143e9e6bdfe3b6 100644 (file)
@@ -547,7 +547,7 @@ public:
   pg_shard_t pg_whoami;
   pg_shard_t up_primary;
   vector<int> up, acting, want_acting;
-  set<pg_shard_t> actingbackfill, actingset;
+  set<pg_shard_t> actingbackfill, actingset, upset;
   map<pg_shard_t,eversion_t> peer_last_complete_ondisk;
   eversion_t  min_last_complete_ondisk;  // up: min over last_complete_ondisk, peer_last_complete_ondisk
   eversion_t  pg_trim_to;
@@ -2145,7 +2145,15 @@ public:
            acting[i],
            pool.info.ec_pool() ? shard_id_t(i) : shard_id_t::NO_SHARD));
     }
+    upset.clear();
     up = newup;
+    for (uint8_t i = 0; i < up.size(); ++i) {
+      if (up[i] != CRUSH_ITEM_NONE)
+       upset.insert(
+         pg_shard_t(
+           up[i],
+           pool.info.ec_pool() ? shard_id_t(i) : shard_id_t::NO_SHARD));
+    }
     if (!pool.info.ec_pool()) {
       up_primary = pg_shard_t(new_up_primary, shard_id_t::NO_SHARD);
       primary = pg_shard_t(new_acting_primary, shard_id_t::NO_SHARD);