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