From: Sage Weil Date: Wed, 12 Apr 2017 02:53:56 +0000 (-0400) Subject: messages/MOSDPGBackfill: drop compat cruft X-Git-Tag: v12.0.3~190^2~22 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c390920a74e82e30d3f9b57078771de378357233;p=ceph.git messages/MOSDPGBackfill: drop compat cruft v3 is 8b46dd1dc009981f2fcae7b0e05155e81841c4a5 (pre-firefly). Signed-off-by: Sage Weil --- diff --git a/src/messages/MOSDPGBackfill.h b/src/messages/MOSDPGBackfill.h index bc001118db32..b6557ee807e8 100644 --- a/src/messages/MOSDPGBackfill.h +++ b/src/messages/MOSDPGBackfill.h @@ -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 {} diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 427571551f08..acb6e243a987 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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;