From: Sage Weil Date: Thu, 27 Jul 2017 20:59:44 +0000 (-0400) Subject: osd/PG: ignore CancelRecovery in NotRecovering X-Git-Tag: v12.1.2~50^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F16638%2Fhead;p=ceph.git osd/PG: ignore CancelRecovery in NotRecovering It's possible to get >1 CancelRecovery events in the queue. The first will transition us from Recovering to NotRecovering. Currently the second will make us crash. This is harmless; instead just swallow the event. Fixes: http://tracker.ceph.com/issues/20804 Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.h b/src/osd/PG.h index 924c930dd83d..d0536fd61b5e 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1930,9 +1930,13 @@ public: struct NotRecovering : boost::statechart::state< NotRecovering, Active>, NamedState { typedef boost::mpl::list< - boost::statechart::transition< DoRecovery, WaitLocalRecoveryReserved > + boost::statechart::transition< DoRecovery, WaitLocalRecoveryReserved >, + boost::statechart::custom_reaction< CancelRecovery > > reactions; explicit NotRecovering(my_context ctx); + boost::statechart::result react(const CancelRecovery& evt) { + /* no-op */ + } void exit(); };