]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: call set_last_peering_reset in Started contructor
authorSamuel Just <samuel.just@dreamhost.com>
Fri, 14 Oct 2011 19:59:42 +0000 (12:59 -0700)
committerSamuel Just <samuel.just@dreamhost.com>
Fri, 14 Oct 2011 20:03:52 +0000 (13:03 -0700)
Calling it here should cover all possible replica and primary peering
resets.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/osd/PG.cc

index d2ab9688c3eaeab581a7951ecfe5e9d1e2a252be..a147febb6cc67c80902266b96ebac7ce2998efb3 100644 (file)
@@ -3570,8 +3570,6 @@ void PG::start_peering_interval(const OSDMap *lastmap,
   // -- there was a change! --
   kick();
 
-  set_last_peering_reset();
-
   vector<int> oldacting, oldup;
   int oldrole = get_role();
   int oldprimary = get_primary();
@@ -3981,14 +3979,14 @@ PG::RecoveryState::Initial::react(const MLogRec& i) {
 }
 
 void PG::RecoveryState::Initial::exit() {
-  PG *pg = context< RecoveryMachine >().pg;
-  pg->set_last_peering_reset();
   context< RecoveryMachine >().log_exit(state_name, enter_time);
 }
 
 /*------Started-------*/
 PG::RecoveryState::Started::Started(my_context ctx) : my_base(ctx) {
   state_name = "Started";
+  PG *pg = context< RecoveryMachine >().pg;
+  pg->set_last_peering_reset();
   context< RecoveryMachine >().log_enter(state_name);
 }