@@ -70,6 +70,20 @@ const char *CEPH_CONF_FILE_DEFAULT = "$data_dir/config,/etc/ceph/$cluster.conf,$
7070#define _STR (x ) #x
7171#define STRINGIFY (x ) _STR(x)
7272
73+ // Populate list of legacy_values according to the OPTION() definitions
74+ // Note that this is just setting up our map of name->member ptr. The
75+ // default values etc will get loaded in along with new-style data,
76+ // as all loads write to both the values map, and the legacy
77+ // members if present.
78+ const std::map<std::string_view, md_config_t ::member_ptr_t > md_config_t ::legacy_values = {
79+ #define OPTION (name, type ) \
80+ {STRINGIFY (name), &ConfigValues::name},
81+ #define SAFE_OPTION (name, type ) OPTION(name, type)
82+ #include " options/legacy_config_opts.h"
83+ #undef OPTION
84+ #undef SAFE_OPTION
85+ };
86+
7387const char *ceph_conf_level_name (int level)
7488{
7589 switch (level) {
@@ -172,20 +186,6 @@ md_config_t::md_config_t(ConfigValues& values,
172186 schema.emplace (opt.name , opt);
173187 }
174188
175- // Populate list of legacy_values according to the OPTION() definitions
176- // Note that this is just setting up our map of name->member ptr. The
177- // default values etc will get loaded in along with new-style data,
178- // as all loads write to both the values map, and the legacy
179- // members if present.
180- legacy_values = {
181- #define OPTION (name, type ) \
182- {STRINGIFY (name), &ConfigValues::name},
183- #define SAFE_OPTION (name, type ) OPTION(name, type)
184- #include " options/legacy_config_opts.h"
185- #undef OPTION
186- #undef SAFE_OPTION
187- };
188-
189189 validate_schema ();
190190
191191 // Validate default values from the schema
0 commit comments