"get pool parameter <var>", "osd", "r", "cli,rest")
COMMAND("osd pool set " \
"name=pool,type=CephPoolname " \
- "name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_ruleset|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|debug_fake_ec_pool|target_max_bytes|target_max_objects|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|auid|min_read_recency_for_promote|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block " \
+ "name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_ruleset|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|debug_fake_ec_pool|target_max_bytes|target_max_objects|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|auid|min_read_recency_for_promote|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block|debug_white_box_testing_ec_overwrites " \
"name=val,type=CephString " \
"name=force,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
"set pool parameter <var> to <val>", "osd", "rw", "cli,rest")
OSDMonitor::OSDMonitor(CephContext *cct, Monitor *mn, Paxos *p, const string& service_name)
: PaxosService(mn, p, service_name),
+ cct(cct),
inc_osd_cache(g_conf->mon_osd_cache_size),
full_osd_cache(g_conf->mon_osd_cache_size),
thrash_map(0), thrash_last_up_osd(-1),
ss << "expecting value 'true' or '1'";
return -EINVAL;
}
+ } else if (var == "debug_white_box_testing_ec_overwrites") {
+ if (val == "true" || (interr.empty() && n == 1)) {
+ if (cct->check_experimental_feature_enabled(
+ "debug_white_box_testing_ec_overwrites")) {
+ p.flags |= pg_pool_t::FLAG_EC_OVERWRITES;
+ } else {
+ ss << "debug_white_box_testing_ec_overwrites is an experimental feature "
+ << "and must be enabled. Note, this feature does not yet actually "
+ << "work. This flag merely enables some of the preliminary support "
+ << "for testing purposes.";
+ return -ENOTSUP;
+ }
+ } else if (val == "false" || (interr.empty() && n == 0)) {
+ ss << "ec overwrites cannot be disabled once enabled";
+ return -EINVAL;
+ } else {
+ ss << "expecting value 'true', 'false', '0', or '1'";
+ return -EINVAL;
+ }
} else if (var == "target_max_objects") {
if (interr.length()) {
ss << "error parsing int '" << val << "': " << interr;
};
class OSDMonitor : public PaxosService {
+ CephContext *cct;
public:
OSDMap osdmap;
enum {
FLAG_HASHPSPOOL = 1<<0, // hash pg seed and pool together (instead of adding)
FLAG_FULL = 1<<1, // pool is full
- //UNUSED = 1<<2,
+ FLAG_EC_OVERWRITES = 1<<2, // enables overwrites, once enabled, cannot be disabled
FLAG_INCOMPLETE_CLONES = 1<<3, // may have incomplete clones (bc we are/were an overlay)
FLAG_NODELETE = 1<<4, // pool can't be deleted
FLAG_NOPGCHANGE = 1<<5, // pool's pg and pgp num can't be changed
switch (f) {
case FLAG_HASHPSPOOL: return "hashpspool";
case FLAG_FULL: return "full";
+ case FLAG_EC_OVERWRITES: return "ec_overwrites";
case FLAG_INCOMPLETE_CLONES: return "incomplete_clones";
case FLAG_NODELETE: return "nodelete";
case FLAG_NOPGCHANGE: return "nopgchange";
return FLAG_HASHPSPOOL;
if (name == "full")
return FLAG_FULL;
+ if (name == "ec_overwrites")
+ return FLAG_EC_OVERWRITES;
if (name == "incomplete_clones")
return FLAG_INCOMPLETE_CLONES;
if (name == "nodelete")