From 37d7fd3b21cab055721504e1546c6b1657a400af Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 13 Dec 2017 08:19:59 -0600 Subject: [PATCH] osd/PG: pass pool options to ObjectStore on pg create 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 --- src/osd/PG.cc | 7 +++++++ src/osd/PG.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index a618c465793..3d047719724 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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; diff --git a/src/osd/PG.h b/src/osd/PG.h index 3b806d30986..d9eb451f058 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -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&); -- 2.39.5