diff options
author | Samuel Just <sjust@redhat.com> | 2019-04-06 01:53:32 +0200 |
---|---|---|
committer | sjust@redhat.com <sjust@redhat.com> | 2019-05-01 20:22:26 +0200 |
commit | 664f26a6822cfa2770b8eb4244cd81650bdb47cb (patch) | |
tree | ee94eedd038871c93639d70f9cc0ee5ba6379504 /src | |
parent | PeeringState::PeeringMachine::Deleting: rollfoward before resetting backfill (diff) | |
download | ceph-664f26a6822cfa2770b8eb4244cd81650bdb47cb.tar.xz ceph-664f26a6822cfa2770b8eb4244cd81650bdb47cb.zip |
PG: fix last_peering_reset and past_intervals references
Signed-off-by: Samuel Just <sjust@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/osd/PG.cc | 8 | ||||
-rw-r--r-- | src/osd/PG.h | 4 | ||||
-rw-r--r-- | src/osd/PrimaryLogPG.cc | 10 |
3 files changed, 9 insertions, 13 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 38d7f495c45..26d5693802c 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -192,9 +192,7 @@ PG::PG(OSDService *o, OSDMapRef curmap, actingset(recovery_state.actingset), acting_recovery_backfill(recovery_state.acting_recovery_backfill), info(recovery_state.info), - past_intervals(recovery_state.past_intervals), pg_log(recovery_state.pg_log), - last_peering_reset(recovery_state.last_peering_reset), last_update_ondisk(recovery_state.last_update_ondisk), last_complete_ondisk(recovery_state.last_complete_ondisk), last_update_applied(recovery_state.last_update_applied), @@ -3373,10 +3371,10 @@ void PG::scrub_finish() bool PG::old_peering_msg(epoch_t reply_epoch, epoch_t query_epoch) { - if (last_peering_reset > reply_epoch || - last_peering_reset > query_epoch) { + if (get_last_peering_reset() > reply_epoch || + get_last_peering_reset() > query_epoch) { dout(10) << "old_peering_msg reply_epoch " << reply_epoch << " query_epoch " << query_epoch - << " last_peering_reset " << last_peering_reset + << " last_peering_reset " << get_last_peering_reset() << dendl; return true; } diff --git a/src/osd/PG.h b/src/osd/PG.h index 933a1476c1f..ab580998164 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -189,9 +189,7 @@ protected: set<pg_shard_t> &actingset; set<pg_shard_t> &acting_recovery_backfill; pg_info_t &info; - PastIntervals &past_intervals; PGLog &pg_log; - epoch_t &last_peering_reset; eversion_t &last_update_ondisk; eversion_t &last_complete_ondisk; eversion_t &last_update_applied; @@ -701,7 +699,7 @@ public: protected: epoch_t get_last_peering_reset() const { - return last_peering_reset; + return recovery_state.get_last_peering_reset(); } /* heartbeat peers */ diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 6787b5b9f63..75ce5e4c37b 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10664,7 +10664,7 @@ void PrimaryLogPG::submit_log_entries( spg_t(info.pgid.pgid, i->shard), pg_whoami.shard, get_osdmap_epoch(), - last_peering_reset, + get_last_peering_reset(), repop->rep_tid, pg_trim_to, min_last_complete_ondisk); @@ -10675,7 +10675,7 @@ void PrimaryLogPG::submit_log_entries( MOSDPGLog *m = new MOSDPGLog( peer.shard, pg_whoami.shard, info.last_update.epoch, - info, last_peering_reset); + info, get_last_peering_reset()); m->log.log = entries; m->log.tail = old_last_update; m->log.head = info.last_update; @@ -13000,7 +13000,7 @@ uint64_t PrimaryLogPG::recover_backfill( dout(10) << " scanning peer osd." << bt << " from " << pbi.end << dendl; epoch_t e = get_osdmap_epoch(); MOSDPGScan *m = new MOSDPGScan( - MOSDPGScan::OP_SCAN_GET_DIGEST, pg_whoami, e, last_peering_reset, + MOSDPGScan::OP_SCAN_GET_DIGEST, pg_whoami, e, get_last_peering_reset(), spg_t(info.pgid.pgid, bt.shard), pbi.end, hobject_t()); osd->send_message_osd_cluster(bt.osd, m, get_osdmap_epoch()); @@ -13244,7 +13244,7 @@ uint64_t PrimaryLogPG::recover_backfill( m = new MOSDPGBackfill( MOSDPGBackfill::OP_BACKFILL_FINISH, e, - last_peering_reset, + get_last_peering_reset(), spg_t(info.pgid.pgid, bt.shard)); // Use default priority here, must match sub_op priority /* pinfo.stats might be wrong if we did log-based recovery on the @@ -13256,7 +13256,7 @@ uint64_t PrimaryLogPG::recover_backfill( m = new MOSDPGBackfill( MOSDPGBackfill::OP_BACKFILL_PROGRESS, e, - last_peering_reset, + get_last_peering_reset(), spg_t(info.pgid.pgid, bt.shard)); // Use default priority here, must match sub_op priority } |