]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: clear agent state when PG becomes a replica
authorSage Weil <sage@inktank.com>
Sat, 1 Feb 2014 05:16:54 +0000 (21:16 -0800)
committerSage Weil <sage@inktank.com>
Sun, 16 Feb 2014 06:09:39 +0000 (22:09 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/PG.cc
src/osd/PG.h

index 14242b74c2d83e545f6015d62f648d9b5da9b7c6..588dd5167fa5e58a29e91d5de5fe38b73a6c0d5f 100644 (file)
@@ -5955,6 +5955,8 @@ PG::RecoveryState::ReplicaActive::ReplicaActive(my_context ctx)
     context< RecoveryMachine >().get_cur_transaction(),
     context< RecoveryMachine >().get_on_applied_context_list(),
     context< RecoveryMachine >().get_on_safe_context_list());
+
+  pg->agent_clear();
 }
 
 
index 3eaebf0c7e3695f88347da0bf260627200b6ab36..064abb2669863765a7e6e8d2264e07abc3aa3272 100644 (file)
@@ -1931,6 +1931,7 @@ public:
 
   virtual void agent_work(int max) = 0;
   virtual void agent_stop() = 0;
+  virtual void agent_clear() = 0;
 };
 
 ostream& operator<<(ostream& out, const PG& pg);