const char** get_tracked_conf_keys() const {
static const char *KEYS[] = {
"enable_experimental_unrecoverable_data_corrupting_features",
+ "crush_location",
NULL
};
return KEYS;
void handle_conf_change(const md_config_t *conf,
const std::set <std::string> &changed) {
- ceph_spin_lock(&cct->_feature_lock);
- get_str_set(conf->enable_experimental_unrecoverable_data_corrupting_features,
- cct->_experimental_features);
- ceph_spin_unlock(&cct->_feature_lock);
- if (!cct->_experimental_features.empty())
- lderr(cct) << "WARNING: the following dangerous and experimental features are enabled: "
- << cct->_experimental_features << dendl;
+ if (changed.count(
+ "enable_experimental_unrecoverable_data_corrupting_features")) {
+ ceph_spin_lock(&cct->_feature_lock);
+ get_str_set(
+ conf->enable_experimental_unrecoverable_data_corrupting_features,
+ cct->_experimental_features);
+ ceph_spin_unlock(&cct->_feature_lock);
+ if (!cct->_experimental_features.empty())
+ lderr(cct) << "WARNING: the following dangerous and experimental features are enabled: "
+ << cct->_experimental_features << dendl;
+ }
+ if (changed.count("crush_location")) {
+ cct->crush_location.update_from_conf();
+ }
}
};
_crypto_aes(NULL),
_plugin_registry(NULL),
_lockdep_obs(NULL),
+ crush_location(this),
_cct_perf(NULL)
{
ceph_spin_init(&_service_thread_lock);
#include "include/atomic.h"
#include "common/cmdparse.h"
#include "include/Spinlock.h"
+#include "crush/CrushLocation.h"
#include <boost/noncopyable.hpp>
class AdminSocket;
md_config_obs_t *_lockdep_obs;
+public:
+ CrushLocation crush_location;
+private:
+
enum {
l_cct_first,
l_cct_total_workers,