]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PG: add get_history() accessor
authorSage Weil <sage@redhat.com>
Wed, 13 Sep 2017 21:14:08 +0000 (17:14 -0400)
committerSage Weil <sage@redhat.com>
Fri, 6 Oct 2017 18:08:17 +0000 (13:08 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/PG.h

index 9dff74eeff8b5719ac41b07816d8f00049d6c98c..13e844762669e57dc560f0cc37bb2db0e1d469b1 100644 (file)
@@ -1628,7 +1628,7 @@ void OSDService::handle_misdirected_op(PG *pg, OpRequestRef op)
   const MOSDOp *m = static_cast<const MOSDOp*>(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<int> up, acting;
     osdmap->pg_to_up_acting_osds(
index 7cf44431c880b151d0588fa97d7a4dea74675955..a02dc8762b737f2996bb8352193f8f289dd8b073 100644 (file)
@@ -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;
   }