From: Sage Weil Date: Wed, 13 Sep 2017 21:14:08 +0000 (-0400) Subject: osd/PG: add get_history() accessor X-Git-Tag: v13.0.1~634^2~68 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=58684c582795307f4a25291c61e72cea6fc657a4;p=ceph-ci.git osd/PG: add get_history() accessor Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 9dff74eeff8..13e84476266 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1628,7 +1628,7 @@ void OSDService::handle_misdirected_op(PG *pg, OpRequestRef op) const MOSDOp *m = static_cast(op->get_req()); assert(m->get_type() == CEPH_MSG_OSD_OP); - assert(m->get_map_epoch() >= pg->info.history.same_primary_since); + assert(m->get_map_epoch() >= pg->get_history().same_primary_since); if (pg->is_ec_pg()) { /** @@ -8941,7 +8941,7 @@ void OSD::handle_pg_remove(OpRequestRef op) } dout(5) << "queue_pg_for_deletion: " << pgid << dendl; PG *pg = _lookup_lock_pg_with_map_lock_held(pgid); - pg_history_t history = pg->info.history; + pg_history_t history = pg->get_history(); int up_primary, acting_primary; vector up, acting; osdmap->pg_to_up_acting_osds( diff --git a/src/osd/PG.h b/src/osd/PG.h index 7cf44431c88..a02dc8762b7 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -2273,6 +2273,8 @@ public: return info.last_user_version; } + const pg_history_t& get_history() const { return info.history; } + void reset_min_peer_features() { peer_features = CEPH_FEATURES_SUPPORTED_DEFAULT; }