]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: ignore CancelRecovery in NotRecovering 16638/head
authorSage Weil <sage@redhat.com>
Thu, 27 Jul 2017 20:59:44 +0000 (16:59 -0400)
committerSage Weil <sage@redhat.com>
Thu, 27 Jul 2017 20:59:44 +0000 (16:59 -0400)
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 <sage@redhat.com>
src/osd/PG.h

index 924c930dd83d995ad9eae067588695bf9a7779e2..d0536fd61b5e8429f6a4fb8ec5a6c2daf97dccb9 100644 (file)
@@ -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();
     };