Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon/OSDMonitor.cc: remove use of boost assign #11060

Merged
merged 1 commit into from
Sep 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
83 changes: 43 additions & 40 deletions src/mon/OSDMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <algorithm>
#include <sstream>
#include <boost/assign.hpp>

#include "OSDMonitor.h"
#include "Monitor.h"
Expand Down Expand Up @@ -3542,48 +3541,52 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
cmd_getval(g_ceph_context, cmdmap, "var", var);

typedef std::map<std::string, osd_pool_get_choices> choices_map_t;
const choices_map_t ALL_CHOICES = boost::assign::map_list_of
("size", SIZE)
("min_size", MIN_SIZE)
("crash_replay_interval", CRASH_REPLAY_INTERVAL)
("pg_num", PG_NUM)("pgp_num", PGP_NUM)("crush_ruleset", CRUSH_RULESET)
("hashpspool", HASHPSPOOL)("nodelete", NODELETE)
("nopgchange", NOPGCHANGE)("nosizechange", NOSIZECHANGE)
("noscrub", NOSCRUB)("nodeep-scrub", NODEEP_SCRUB)
("write_fadvise_dontneed", WRITE_FADVISE_DONTNEED)
("hit_set_type", HIT_SET_TYPE)("hit_set_period", HIT_SET_PERIOD)
("hit_set_count", HIT_SET_COUNT)("hit_set_fpp", HIT_SET_FPP)
("use_gmt_hitset", USE_GMT_HITSET)
("auid", AUID)("target_max_objects", TARGET_MAX_OBJECTS)
("target_max_bytes", TARGET_MAX_BYTES)
("cache_target_dirty_ratio", CACHE_TARGET_DIRTY_RATIO)
("cache_target_dirty_high_ratio", CACHE_TARGET_DIRTY_HIGH_RATIO)
("cache_target_full_ratio", CACHE_TARGET_FULL_RATIO)
("cache_min_flush_age", CACHE_MIN_FLUSH_AGE)
("cache_min_evict_age", CACHE_MIN_EVICT_AGE)
("erasure_code_profile", ERASURE_CODE_PROFILE)
("min_read_recency_for_promote", MIN_READ_RECENCY_FOR_PROMOTE)
("min_write_recency_for_promote", MIN_WRITE_RECENCY_FOR_PROMOTE)
("fast_read", FAST_READ)
("hit_set_grade_decay_rate", HIT_SET_GRADE_DECAY_RATE)
("hit_set_search_last_n", HIT_SET_SEARCH_LAST_N)
("scrub_min_interval", SCRUB_MIN_INTERVAL)
("scrub_max_interval", SCRUB_MAX_INTERVAL)
("deep_scrub_interval", DEEP_SCRUB_INTERVAL)
("recovery_priority", RECOVERY_PRIORITY)
("recovery_op_priority", RECOVERY_OP_PRIORITY)
("scrub_priority", SCRUB_PRIORITY);
const choices_map_t ALL_CHOICES = {
{"size", SIZE},
{"min_size", MIN_SIZE},
{"crash_replay_interval", CRASH_REPLAY_INTERVAL},
{"pg_num", PG_NUM}, {"pgp_num", PGP_NUM}, {"crush_ruleset", CRUSH_RULESET},
{"hashpspool", HASHPSPOOL}, {"nodelete", NODELETE},
{"nopgchange", NOPGCHANGE}, {"nosizechange", NOSIZECHANGE},
{"noscrub", NOSCRUB}, {"nodeep-scrub", NODEEP_SCRUB},
{"write_fadvise_dontneed", WRITE_FADVISE_DONTNEED},
{"hit_set_type", HIT_SET_TYPE}, {"hit_set_period", HIT_SET_PERIOD},
{"hit_set_count", HIT_SET_COUNT}, {"hit_set_fpp", HIT_SET_FPP},
{"use_gmt_hitset", USE_GMT_HITSET},
{"auid", AUID}, {"target_max_objects", TARGET_MAX_OBJECTS},
{"target_max_bytes", TARGET_MAX_BYTES},
{"cache_target_dirty_ratio", CACHE_TARGET_DIRTY_RATIO},
{"cache_target_dirty_high_ratio", CACHE_TARGET_DIRTY_HIGH_RATIO},
{"cache_target_full_ratio", CACHE_TARGET_FULL_RATIO},
{"cache_min_flush_age", CACHE_MIN_FLUSH_AGE},
{"cache_min_evict_age", CACHE_MIN_EVICT_AGE},
{"erasure_code_profile", ERASURE_CODE_PROFILE},
{"min_read_recency_for_promote", MIN_READ_RECENCY_FOR_PROMOTE},
{"min_write_recency_for_promote", MIN_WRITE_RECENCY_FOR_PROMOTE},
{"fast_read", FAST_READ},
{"hit_set_grade_decay_rate", HIT_SET_GRADE_DECAY_RATE},
{"hit_set_search_last_n", HIT_SET_SEARCH_LAST_N},
{"scrub_min_interval", SCRUB_MIN_INTERVAL},
{"scrub_max_interval", SCRUB_MAX_INTERVAL},
{"deep_scrub_interval", DEEP_SCRUB_INTERVAL},
{"recovery_priority", RECOVERY_PRIORITY},
{"recovery_op_priority", RECOVERY_OP_PRIORITY},
{"scrub_priority", SCRUB_PRIORITY},
};

typedef std::set<osd_pool_get_choices> choices_set_t;

const choices_set_t ONLY_TIER_CHOICES = boost::assign::list_of
(HIT_SET_TYPE)(HIT_SET_PERIOD)(HIT_SET_COUNT)(HIT_SET_FPP)
(TARGET_MAX_OBJECTS)(TARGET_MAX_BYTES)(CACHE_TARGET_FULL_RATIO)
(CACHE_TARGET_DIRTY_RATIO)(CACHE_TARGET_DIRTY_HIGH_RATIO)
(CACHE_MIN_FLUSH_AGE)(CACHE_MIN_EVICT_AGE)(MIN_READ_RECENCY_FOR_PROMOTE)
(HIT_SET_GRADE_DECAY_RATE)(HIT_SET_SEARCH_LAST_N);
const choices_set_t ONLY_ERASURE_CHOICES = boost::assign::list_of
(ERASURE_CODE_PROFILE);
const choices_set_t ONLY_TIER_CHOICES = {
{HIT_SET_TYPE}, {HIT_SET_PERIOD}, {HIT_SET_COUNT}, {HIT_SET_FPP},
{TARGET_MAX_OBJECTS}, {TARGET_MAX_BYTES}, {CACHE_TARGET_FULL_RATIO},
{CACHE_TARGET_DIRTY_RATIO}, {CACHE_TARGET_DIRTY_HIGH_RATIO},
{CACHE_MIN_FLUSH_AGE}, {CACHE_MIN_EVICT_AGE},
{MIN_READ_RECENCY_FOR_PROMOTE},
{HIT_SET_GRADE_DECAY_RATE}, {HIT_SET_SEARCH_LAST_N}
};
const choices_set_t ONLY_ERASURE_CHOICES = {
{ERASURE_CODE_PROFILE}
};

choices_set_t selected_choices;
if (var == "all") {
Expand Down