Skip to content

Commit

Permalink
Merge pull request ceph#62075 from ronen-fr/wip-rf-more5-keys
Browse files Browse the repository at this point in the history
bluestore, librados, msg: replace obsolete get_tracked_conf_keys()

Reviewed-by: Matan Breizman <[email protected]>
Reviewed-by: Radoslaw Zarzynski <[email protected]>
  • Loading branch information
ronen-fr authored Mar 5, 2025
2 parents 3af0276 + 79d74bf commit aed35de
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 63 deletions.
12 changes: 6 additions & 6 deletions src/librados/RadosClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ using std::ostringstream;
using std::string;
using std::map;
using std::vector;
using namespace std::literals;

namespace bc = boost::container;
namespace bs = boost::system;
Expand Down Expand Up @@ -1169,14 +1170,13 @@ int librados::RadosClient::get_inconsistent_pgs(int64_t pool_id,
return 0;
}

const char** librados::RadosClient::get_tracked_conf_keys() const
std::vector<std::string> librados::RadosClient::get_tracked_keys()
const noexcept
{
static const char *config_keys[] = {
"librados_thread_count",
"rados_mon_op_timeout",
nullptr
return {
"librados_thread_count"s,
"rados_mon_op_timeout"s
};
return config_keys;
}

void librados::RadosClient::handle_conf_change(const ConfigProxy& conf,
Expand Down
2 changes: 1 addition & 1 deletion src/librados/RadosClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class librados::RadosClient : public Dispatcher,
mon_feature_t get_required_monitor_features() const;

int get_inconsistent_pgs(int64_t pool_id, std::vector<std::string>* pgs);
const char** get_tracked_conf_keys() const override;
std::vector<std::string> get_tracked_keys() const noexcept override;
void handle_conf_change(const ConfigProxy& conf,
const std::set <std::string> &changed) override;
};
Expand Down
16 changes: 8 additions & 8 deletions src/msg/compressor_registry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "compressor_registry.h"
#include "common/dout.h"

using namespace std::literals;

#define dout_subsys ceph_subsys_ms
#undef dout_prefix
#define dout_prefix *_dout << "CompressorRegistry(" << this << ") "
Expand All @@ -19,16 +21,14 @@ CompressorRegistry::~CompressorRegistry()
cct->_conf.remove_observer(this);
}

const char** CompressorRegistry::get_tracked_conf_keys() const
std::vector<std::string> CompressorRegistry::get_tracked_keys() const noexcept
{
static const char *keys[] = {
"ms_osd_compress_mode",
"ms_osd_compression_algorithm",
"ms_osd_compress_min_size",
"ms_compress_secure",
nullptr
return {
"ms_osd_compress_mode"s,
"ms_osd_compression_algorithm"s,
"ms_osd_compress_min_size"s,
"ms_compress_secure"s
};
return keys;
}

void CompressorRegistry::handle_conf_change(
Expand Down
2 changes: 1 addition & 1 deletion src/msg/compressor_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CompressorRegistry : public md_config_obs_t {
_refresh_config();
}

const char** get_tracked_conf_keys() const override;
std::vector<std::string> get_tracked_keys() const noexcept override;
void handle_conf_change(const ConfigProxy& conf,
const std::set<std::string>& changed) override;

Expand Down
92 changes: 46 additions & 46 deletions src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ using ceph::mono_clock;
using ceph::mono_time;
using ceph::timespan_str;

using namespace std::literals;

// kv store prefixes
const string PREFIX_SUPER = "S"; // field -> value
const string PREFIX_STAT = "T"; // field -> value(int64 array)
Expand Down Expand Up @@ -5761,53 +5763,51 @@ BlueStore::~BlueStore()
buffer_cache_shards.clear();
}

const char **BlueStore::get_tracked_conf_keys() const
{
static const char* KEYS[] = {
"bluestore_csum_type",
"bluestore_compression_mode",
"bluestore_compression_algorithm",
"bluestore_compression_min_blob_size",
"bluestore_compression_min_blob_size_ssd",
"bluestore_compression_min_blob_size_hdd",
"bluestore_compression_max_blob_size",
"bluestore_compression_max_blob_size_ssd",
"bluestore_compression_max_blob_size_hdd",
"bluestore_compression_required_ratio",
"bluestore_max_alloc_size",
"bluestore_prefer_deferred_size",
"bluestore_prefer_deferred_size_hdd",
"bluestore_prefer_deferred_size_ssd",
"bluestore_deferred_batch_ops",
"bluestore_deferred_batch_ops_hdd",
"bluestore_deferred_batch_ops_ssd",
"bluestore_throttle_bytes",
"bluestore_throttle_deferred_bytes",
"bluestore_throttle_cost_per_io_hdd",
"bluestore_throttle_cost_per_io_ssd",
"bluestore_throttle_cost_per_io",
"bluestore_max_blob_size",
"bluestore_max_blob_size_ssd",
"bluestore_max_blob_size_hdd",
"osd_memory_target",
"osd_memory_target_cgroup_limit_ratio",
"osd_memory_base",
"osd_memory_cache_min",
"osd_memory_expected_fragmentation",
"bluestore_cache_autotune",
"bluestore_cache_autotune_interval",
"bluestore_cache_age_bin_interval",
"bluestore_cache_kv_age_bins",
"bluestore_cache_kv_onode_age_bins",
"bluestore_cache_meta_age_bins",
"bluestore_cache_data_age_bins",
"bluestore_warn_on_legacy_statfs",
"bluestore_warn_on_no_per_pool_omap",
"bluestore_warn_on_no_per_pg_omap",
"bluestore_max_defer_interval",
NULL
std::vector<std::string> BlueStore::get_tracked_keys() const noexcept
{
return {
"bluestore_csum_type"s,
"bluestore_compression_mode"s,
"bluestore_compression_algorithm"s,
"bluestore_compression_min_blob_size"s,
"bluestore_compression_min_blob_size_ssd"s,
"bluestore_compression_min_blob_size_hdd"s,
"bluestore_compression_max_blob_size"s,
"bluestore_compression_max_blob_size_ssd"s,
"bluestore_compression_max_blob_size_hdd"s,
"bluestore_compression_required_ratio"s,
"bluestore_max_alloc_size"s,
"bluestore_prefer_deferred_size"s,
"bluestore_prefer_deferred_size_hdd"s,
"bluestore_prefer_deferred_size_ssd"s,
"bluestore_deferred_batch_ops"s,
"bluestore_deferred_batch_ops_hdd"s,
"bluestore_deferred_batch_ops_ssd"s,
"bluestore_throttle_bytes"s,
"bluestore_throttle_deferred_bytes"s,
"bluestore_throttle_cost_per_io_hdd"s,
"bluestore_throttle_cost_per_io_ssd"s,
"bluestore_throttle_cost_per_io"s,
"bluestore_max_blob_size"s,
"bluestore_max_blob_size_ssd"s,
"bluestore_max_blob_size_hdd"s,
"osd_memory_target"s,
"osd_memory_target_cgroup_limit_ratio"s,
"osd_memory_base"s,
"osd_memory_cache_min"s,
"osd_memory_expected_fragmentation"s,
"bluestore_cache_autotune"s,
"bluestore_cache_autotune_interval"s,
"bluestore_cache_age_bin_interval"s,
"bluestore_cache_kv_age_bins"s,
"bluestore_cache_kv_onode_age_bins"s,
"bluestore_cache_meta_age_bins"s,
"bluestore_cache_data_age_bins"s,
"bluestore_warn_on_legacy_statfs"s,
"bluestore_warn_on_no_per_pool_omap"s,
"bluestore_warn_on_no_per_pg_omap"s,
"bluestore_max_defer_interval"s
};
return KEYS;
}

void BlueStore::handle_conf_change(const ConfigProxy& conf,
Expand Down
2 changes: 1 addition & 1 deletion src/os/bluestore/BlueStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class BlueStore : public ObjectStore,
// types
public:
// config observer
const char** get_tracked_conf_keys() const override;
std::vector<std::string> get_tracked_keys() const noexcept override;
void handle_conf_change(const ConfigProxy& conf,
const std::set<std::string> &changed) override;

Expand Down

0 comments on commit aed35de

Please sign in to comment.