]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PG: pass pool options to ObjectStore on pg create
authorSage Weil <sage@redhat.com>
Wed, 13 Dec 2017 14:19:59 +0000 (08:19 -0600)
committerSage Weil <sage@redhat.com>
Wed, 13 Dec 2017 14:19:59 +0000 (08:19 -0600)
We were handling the load case and the pool change case, but not newly
created PG.

Fixes: http://tracker.ceph.com/issues/22419
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc
src/osd/PG.h

index a618c46579315b3c9a273851ed1a4762e9de17b0..3d047719724ad1567f5715dfab23def85f5e61d1 100644 (file)
@@ -6051,6 +6051,13 @@ PG::RecoveryState::Initial::Initial(my_context ctx)
   context< RecoveryMachine >().log_enter(state_name);
 }
 
+boost::statechart::result PG::RecoveryState::Initial::react(const Initialize& l)
+{
+  PG *pg = context< RecoveryMachine >().pg;
+  pg->update_store_with_options();
+  return transit< Reset >();
+}
+
 boost::statechart::result PG::RecoveryState::Initial::react(const Load& l)
 {
   PG *pg = context< RecoveryMachine >().pg;
index 3b806d3098617cf4ee864a073d8322acfc80807e..d9eb451f058561e357634320629f6cd24955f449 100644 (file)
@@ -1982,13 +1982,14 @@ protected:
       void exit();
 
       typedef boost::mpl::list <
-       boost::statechart::transition< Initialize, Reset >,
+       boost::statechart::custom_reaction< Initialize >,
        boost::statechart::custom_reaction< Load >,
        boost::statechart::custom_reaction< NullEvt >,
        boost::statechart::transition< boost::statechart::event_base, Crashed >
        > reactions;
 
       boost::statechart::result react(const Load&);
+      boost::statechart::result react(const Initialize&);
       boost::statechart::result react(const MNotifyRec&);
       boost::statechart::result react(const MInfoRec&);
       boost::statechart::result react(const MLogRec&);