]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
messages/MOSDPGBackfill: drop compat cruft
authorSage Weil <sage@redhat.com>
Wed, 12 Apr 2017 02:53:56 +0000 (22:53 -0400)
committerSage Weil <sage@redhat.com>
Fri, 21 Apr 2017 20:00:39 +0000 (16:00 -0400)
v3 is 8b46dd1dc009981f2fcae7b0e05155e81841c4a5 (pre-firefly).

Signed-off-by: Sage Weil <sage@redhat.com>
src/messages/MOSDPGBackfill.h
src/osd/PrimaryLogPG.cc

index bc001118db320077598fb963715aa2857360eee7..b6557ee807e8afd0d321021e2d9a7e2eb404f495 100644 (file)
@@ -19,7 +19,7 @@
 
 class MOSDPGBackfill : public MOSDFastDispatchOp {
   static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 1;
+  static const int COMPAT_VERSION = 3;
 public:
   enum {
     OP_BACKFILL_PROGRESS = 2,
@@ -39,7 +39,6 @@ public:
   epoch_t map_epoch, query_epoch;
   spg_t pgid;
   hobject_t last_backfill;
-  bool compat_stat_sum;
   pg_stat_t stats;
 
   epoch_t get_map_epoch() const override {
@@ -60,20 +59,13 @@ public:
     // For compatibility with version 1
     ::decode(stats.stats, p);
 
-    if (header.version >= 2) {
-      ::decode(stats, p);
-    } else {
-      compat_stat_sum = true;
-    }
+    ::decode(stats, p);
 
     // Handle hobject_t format change
     if (!last_backfill.is_max() &&
        last_backfill.pool == -1)
       last_backfill.pool = pgid.pool();
-    if (header.version >= 3)
-      ::decode(pgid.shard, p);
-    else
-      pgid.shard = shard_id_t::NO_SHARD;
+    ::decode(pgid.shard, p);
   }
 
   void encode_payload(uint64_t features) override {
@@ -92,14 +84,12 @@ public:
   }
 
   MOSDPGBackfill()
-    : MOSDFastDispatchOp(MSG_OSD_PG_BACKFILL, HEAD_VERSION, COMPAT_VERSION),
-      compat_stat_sum(false) {}
+    : MOSDFastDispatchOp(MSG_OSD_PG_BACKFILL, HEAD_VERSION, COMPAT_VERSION) {}
   MOSDPGBackfill(__u32 o, epoch_t e, epoch_t qe, spg_t p)
     : MOSDFastDispatchOp(MSG_OSD_PG_BACKFILL, HEAD_VERSION, COMPAT_VERSION),
       op(o),
       map_epoch(e), query_epoch(e),
-      pgid(p),
-      compat_stat_sum(false) {}
+      pgid(p) {}
 private:
   ~MOSDPGBackfill() override {}
 
index 427571551f08946f038d9d9dc0fa2010fe2c7804..acb6e243a98718167f2a3b8e46c9fb7ef748e5f0 100644 (file)
@@ -3429,11 +3429,7 @@ void PrimaryLogPG::do_backfill(OpRequestRef op)
       assert(cct->_conf->osd_kill_backfill_at != 2);
 
       info.set_last_backfill(m->last_backfill);
-      if (m->compat_stat_sum) {
-       info.stats.stats = m->stats.stats; // Previously, we only sent sum
-      } else {
-       info.stats = m->stats;
-      }
+      info.stats = m->stats;
 
       ObjectStore::Transaction t;
       dirty_info = true;