From 230aad7baa855f4b684b3ca5c973fdced89fb371 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 31 Jan 2014 21:16:54 -0800 Subject: [PATCH] osd: clear agent state when PG becomes a replica Signed-off-by: Sage Weil --- src/osd/PG.cc | 2 ++ src/osd/PG.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 14242b74c2d..588dd5167fa 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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(); } diff --git a/src/osd/PG.h b/src/osd/PG.h index 3eaebf0c7e3..064abb26698 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -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); -- 2.47.3