]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: include info and query by value in peering events
authorSamuel Just <sam.just@inktank.com>
Thu, 31 May 2012 05:19:48 +0000 (22:19 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 5 Jul 2012 17:14:58 +0000 (10:14 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc
src/osd/PG.h

index 337a616e8728176802e590f8736b24f2038c8668..427a29846667dd81650a974a26fc63c0567afbbc 100644 (file)
@@ -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<int,pg_info_t>::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;
index 86615926224bd73fafae4a6849f1d0269914cca1..ad4e2efaf486cd736009044aa03287e912e4df73 100644 (file)
@@ -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) {}