From: Michal Jarzabek Date: Sun, 11 Sep 2016 21:50:57 +0000 (+0100) Subject: mon/OSDMonitor.cc: remove use of boost assign X-Git-Tag: v11.0.1~150^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37ea6afb224125496569ba580982cbac09e181de;p=ceph.git mon/OSDMonitor.cc: remove use of boost assign we can now use C++11 initialisation Signed-off-by: Michal Jarzabek --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index bfdaf1ef68e..fb029b27a31 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -18,7 +18,6 @@ #include #include -#include #include "OSDMonitor.h" #include "Monitor.h" @@ -3542,48 +3541,52 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op) cmd_getval(g_ceph_context, cmdmap, "var", var); typedef std::map 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 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") {