mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
mon: add 'ceph osd pool get erasure allow_ec_overwrites' command
Fixes: https://tracker.ceph.com/issues/23487 Signed-off-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
parent
dd03c5e54e
commit
ce561ea204
@ -751,6 +751,13 @@ You may get values for the following keys:
|
||||
:Type: Double
|
||||
|
||||
|
||||
``allow_ec_overwrites``
|
||||
|
||||
:Description: see allow_ec_overwrites_
|
||||
|
||||
:Type: Boolean
|
||||
|
||||
|
||||
Set the Number of Object Replicas
|
||||
=================================
|
||||
|
||||
|
@ -936,7 +936,7 @@ COMMAND("osd pool rename " \
|
||||
"rename <srcpool> to <destpool>", "osd", "rw", "cli,rest")
|
||||
COMMAND("osd pool get " \
|
||||
"name=pool,type=CephPoolname " \
|
||||
"name=var,type=CephChoices,strings=size|min_size|pg_num|pgp_num|crush_rule|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|auid|target_max_objects|target_max_bytes|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|erasure_code_profile|min_read_recency_for_promote|all|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|pg_num|pgp_num|crush_rule|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|auid|target_max_objects|target_max_bytes|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|erasure_code_profile|min_read_recency_for_promote|all|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|allow_ec_overwrites", \
|
||||
"get pool parameter <var>", "osd", "r", "cli,rest")
|
||||
COMMAND("osd pool set " \
|
||||
"name=pool,type=CephPoolname " \
|
||||
|
@ -3569,7 +3569,7 @@ void OSDMonitor::dump_info(Formatter *f)
|
||||
namespace {
|
||||
enum osd_pool_get_choices {
|
||||
SIZE, MIN_SIZE,
|
||||
PG_NUM, PGP_NUM, CRUSH_RULE, HASHPSPOOL,
|
||||
PG_NUM, PGP_NUM, CRUSH_RULE, HASHPSPOOL, EC_OVERWRITES,
|
||||
NODELETE, NOPGCHANGE, NOSIZECHANGE,
|
||||
WRITE_FADVISE_DONTNEED, NOSCRUB, NODEEP_SCRUB,
|
||||
HIT_SET_TYPE, HIT_SET_PERIOD, HIT_SET_COUNT, HIT_SET_FPP,
|
||||
@ -4178,8 +4178,8 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
|
||||
{"size", SIZE},
|
||||
{"min_size", MIN_SIZE},
|
||||
{"pg_num", PG_NUM}, {"pgp_num", PGP_NUM},
|
||||
{"crush_rule", CRUSH_RULE},
|
||||
{"hashpspool", HASHPSPOOL}, {"nodelete", NODELETE},
|
||||
{"crush_rule", CRUSH_RULE}, {"hashpspool", HASHPSPOOL},
|
||||
{"allow_ec_overwrites", EC_OVERWRITES}, {"nodelete", NODELETE},
|
||||
{"nopgchange", NOPGCHANGE}, {"nosizechange", NOSIZECHANGE},
|
||||
{"noscrub", NOSCRUB}, {"nodeep-scrub", NODEEP_SCRUB},
|
||||
{"write_fadvise_dontneed", WRITE_FADVISE_DONTNEED},
|
||||
@ -4227,7 +4227,7 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
|
||||
HIT_SET_GRADE_DECAY_RATE, HIT_SET_SEARCH_LAST_N
|
||||
};
|
||||
const choices_set_t ONLY_ERASURE_CHOICES = {
|
||||
ERASURE_CODE_PROFILE
|
||||
EC_OVERWRITES, ERASURE_CODE_PROFILE
|
||||
};
|
||||
|
||||
choices_set_t selected_choices;
|
||||
@ -4314,6 +4314,10 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
|
||||
f->dump_string("crush_rule", stringify(p->get_crush_rule()));
|
||||
}
|
||||
break;
|
||||
case EC_OVERWRITES:
|
||||
f->dump_bool("allow_ec_overwrites",
|
||||
p->has_flag(pg_pool_t::FLAG_EC_OVERWRITES));
|
||||
break;
|
||||
case HASHPSPOOL:
|
||||
case NODELETE:
|
||||
case NOPGCHANGE:
|
||||
@ -4527,6 +4531,11 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
|
||||
ss << "hit_set_search_last_n: " <<
|
||||
p->hit_set_search_last_n << "\n";
|
||||
break;
|
||||
case EC_OVERWRITES:
|
||||
ss << "allow_ec_overwrites: " <<
|
||||
(p->has_flag(pg_pool_t::FLAG_EC_OVERWRITES) ? "true" : "false") <<
|
||||
"\n";
|
||||
break;
|
||||
case HASHPSPOOL:
|
||||
case NODELETE:
|
||||
case NOPGCHANGE:
|
||||
|
Loading…
Reference in New Issue
Block a user