From c7e34951e83edd833e1e78b8250c0dcd5d60dc27 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 30 May 2012 22:19:48 -0700 Subject: [PATCH] PG: include info and query by value in peering events Signed-off-by: Samuel Just --- src/osd/PG.cc | 3 ++- src/osd/PG.h | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 337a616e87281..427a29846667d 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -229,7 +229,7 @@ void PG::proc_replica_log(ObjectStore::Transaction& t, peer_missing[from].swap(omissing); } -bool PG::proc_replica_info(int from, pg_info_t &oinfo) +bool PG::proc_replica_info(int from, const pg_info_t &oinfo) { map::iterator p = peer_info.find(from); if (p != peer_info.end() && p->second.last_update == oinfo.last_update) { @@ -4000,6 +4000,7 @@ void PG::take_waiters() void PG::handle_peering_event(CephPeeringEvtRef evt, RecoveryCtx *rctx) { + dout(10) << "handle_peering_event" << dendl; if (!require_same_or_newer_map(evt->get_epoch_sent())) { peering_waiters.push_back(evt); return; diff --git a/src/osd/PG.h b/src/osd/PG.h index 86615926224bd..ad4e2efaf486c 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -679,7 +679,7 @@ public: pg_missing_t& omissing, int from); void proc_master_log(ObjectStore::Transaction& t, pg_info_t &oinfo, pg_log_t &olog, pg_missing_t& omissing, int from); - bool proc_replica_info(int from, pg_info_t &info); + bool proc_replica_info(int from, const pg_info_t &info); bool merge_old_entry(ObjectStore::Transaction& t, pg_log_entry_t& oe); void merge_log(ObjectStore::Transaction& t, pg_info_t &oinfo, pg_log_t &olog, int from); void rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead); @@ -812,7 +812,7 @@ public: struct MInfoRec : boost::statechart::event< MInfoRec > { int from; - pg_info_t &info; + pg_info_t info; MInfoRec(int from, pg_info_t &info) : from(from), info(info) {} }; @@ -826,14 +826,14 @@ public: struct MNotifyRec : boost::statechart::event< MNotifyRec > { int from; - pg_info_t &info; + pg_info_t info; MNotifyRec(int from, pg_info_t &info) : from(from), info(info) {} }; struct MQuery : boost::statechart::event< MQuery > { int from; - const pg_query_t &query; + pg_query_t query; epoch_t query_epoch; MQuery(int from, const pg_query_t &query, epoch_t query_epoch): from(from), query(query), query_epoch(query_epoch) {} -- 2.39.5