Modified variables used in ceph_test_rados_io_sequence to use snake_case instead of camelCase to be consistent with prior work.
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>
std::unique_ptr<IoSequence> EcIoSequence::generate_sequence(
Sequence sequence, std::pair<int, int> obj_size_range,
std::optional<std::pair<int, int>> km,
- std::optional<std::pair<std::string_view, std::string_view>> mappingLayers,
+ std::optional<std::pair<std::string_view, std::string_view>> mappinglayers,
int seed) {
switch (sequence) {
case Sequence::SEQUENCE_SEQ0:
[[fallthrough]];
case Sequence::SEQUENCE_SEQ14:
return std::make_unique<ReadInjectSequence>(obj_size_range, seed,
- sequence, km, mappingLayers);
+ sequence, km, mappinglayers);
case Sequence::SEQUENCE_SEQ10:
- return std::make_unique<Seq10>(obj_size_range, seed, km, mappingLayers);
+ return std::make_unique<Seq10>(obj_size_range, seed, km, mappinglayers);
default:
ceph_abort_msg("Unrecognised sequence");
}
void EcIoSequence::select_random_data_shard_to_inject_read_error(
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers) {
+ mappinglayers) {
if (km) {
shard_to_inject = rng(km->first - 1);
}
- if (mappingLayers) {
- int count = std::ranges::count(mappingLayers->first, 'D');
- int dataShardPosition = rng(count - 1);
+ if (mappinglayers) {
+ int count = std::ranges::count(mappinglayers->first, 'D');
+ int data_shard_position = rng(count - 1);
shard_to_inject = 0;
- for (int i = 0; i < dataShardPosition; i++) {
+ for (int i = 0; i < data_shard_position; i++) {
shard_to_inject =
- std::distance(std::find(mappingLayers->first.begin(),
- mappingLayers->first.end(), *shard_to_inject),
- mappingLayers->first.begin());
+ std::distance(std::find(mappinglayers->first.begin(),
+ mappinglayers->first.end(), *shard_to_inject),
+ mappinglayers->first.begin());
ceph_assert(*shard_to_inject != std::string::npos);
}
}
void EcIoSequence::select_random_data_shard_to_inject_write_error(
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers) {
+ mappinglayers) {
// Write errors do not support injecting to the primary OSD
if (km) {
shard_to_inject = rng(1, km->first - 1);
}
- if (mappingLayers) {
- int count = std::ranges::count(mappingLayers->first, 'D');
- if (mappingLayers->first[0] == 'D') {
+ if (mappinglayers) {
+ int count = std::ranges::count(mappinglayers->first, 'D');
+ if (mappinglayers->first[0] == 'D') {
count--;
}
- int dataShardPosition = rng(1, count - 1);
+ int data_shard_position = rng(1, count - 1);
shard_to_inject = 0;
- for (int i = 1; i < dataShardPosition; i++) {
+ for (int i = 1; i < data_shard_position; i++) {
shard_to_inject =
- std::distance(std::find(mappingLayers->first.begin(),
- mappingLayers->first.end(), *shard_to_inject),
- mappingLayers->first.begin());
+ std::distance(std::find(mappinglayers->first.begin(),
+ mappinglayers->first.end(), *shard_to_inject),
+ mappinglayers->first.begin());
ceph_assert(*shard_to_inject != std::string::npos);
}
}
void EcIoSequence::select_random_shard_to_inject_read_error(
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers) {
+ mappinglayers) {
if (km) {
shard_to_inject = rng(km->first + km->second - 1);
}
- if (mappingLayers) {
- int count = std::ranges::count(mappingLayers->first, 'D');
- int dataShardPosition = rng(count - 1);
+ if (mappinglayers) {
+ int count = std::ranges::count(mappinglayers->first, 'D');
+ int data_shard_position = rng(count - 1);
shard_to_inject = 0;
- for (int i = 0; i < dataShardPosition; i++) {
+ for (int i = 0; i < data_shard_position; i++) {
shard_to_inject =
- std::distance(std::find(mappingLayers->first.begin(),
- mappingLayers->first.end(), *shard_to_inject),
- mappingLayers->first.begin());
+ std::distance(std::find(mappinglayers->first.begin(),
+ mappinglayers->first.end(), *shard_to_inject),
+ mappinglayers->first.begin());
ceph_assert(*shard_to_inject != std::string::npos);
}
}
void EcIoSequence::select_random_shard_to_inject_write_error(
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers) {
+ mappinglayers) {
// Write errors do not support injecting to the primary OSD
if (km) {
shard_to_inject = rng(1, km->first + km->second - 1);
}
- if (mappingLayers) {
- int count = std::ranges::count(mappingLayers->first, 'D');
- if (mappingLayers->first[0] == 'D') {
+ if (mappinglayers) {
+ int count = std::ranges::count(mappinglayers->first, 'D');
+ if (mappinglayers->first[0] == 'D') {
count--;
}
- int dataShardPosition = rng(count - 1);
+ int data_shard_position = rng(count - 1);
shard_to_inject = 0;
- for (int i = 0; i < dataShardPosition; i++) {
+ for (int i = 0; i < data_shard_position; i++) {
shard_to_inject =
- std::distance(std::find(mappingLayers->first.begin(),
- mappingLayers->first.end(), *shard_to_inject),
- mappingLayers->first.begin());
+ std::distance(std::find(mappinglayers->first.begin(),
+ mappinglayers->first.end(), *shard_to_inject),
+ mappinglayers->first.begin());
ceph_assert(*shard_to_inject != std::string::npos);
}
}
int seed,
Sequence s,
std::optional<std::pair<int, int>> km,
- std::optional<std::pair<std::string_view, std::string_view>> mappingLayers)
+ std::optional<std::pair<std::string_view, std::string_view>> mappinglayers)
: EcIoSequence(obj_size_range, seed) {
child_sequence = IoSequence::generate_sequence(s, obj_size_range, seed);
- select_random_data_shard_to_inject_read_error(km, mappingLayers);
+ select_random_data_shard_to_inject_read_error(km, mappinglayers);
generate_random_read_inject_type();
}
std::unique_ptr<IoOp> ReadInjectSequence::next() {
step++;
- if (nextOp) {
- std::unique_ptr<IoOp> retOp = nullptr;
- nextOp.swap(retOp);
- return retOp;
+ if (next_op) {
+ std::unique_ptr<IoOp> ret_op = nullptr;
+ next_op.swap(ret_op);
+ return ret_op;
}
- std::unique_ptr<IoOp> childOp = child_sequence->next();
+ std::unique_ptr<IoOp> child_op = child_sequence->next();
- switch (childOp->getOpType()) {
+ switch (child_op->getOpType()) {
case OpType::Remove:
- nextOp.swap(childOp);
+ next_op.swap(child_op);
switch (inject_op_type) {
ceph_assert(shard_to_inject.has_value());
case InjectOpType::ReadEIO:
case OpType::Create:
switch (inject_op_type) {
case InjectOpType::ReadEIO:
- nextOp = InjectReadErrorOp::generate(
+ next_op = InjectReadErrorOp::generate(
*shard_to_inject, 0, 0, std::numeric_limits<uint64_t>::max());
break;
case InjectOpType::ReadMissingShard:
- nextOp = InjectReadErrorOp::generate(
+ next_op = InjectReadErrorOp::generate(
*shard_to_inject, 1, 0, std::numeric_limits<uint64_t>::max());
break;
case InjectOpType::WriteFailAndRollback:
- nextOp = InjectWriteErrorOp::generate(
+ next_op = InjectWriteErrorOp::generate(
*shard_to_inject, 0, 0, std::numeric_limits<uint64_t>::max());
break;
case InjectOpType::WriteOSDAbort:
- nextOp = InjectWriteErrorOp::generate(
+ next_op = InjectWriteErrorOp::generate(
*shard_to_inject, 3, 0, std::numeric_limits<uint64_t>::max());
break;
case InjectOpType::None:
break;
}
- return childOp;
+ return child_op;
}
std::unique_ptr<ceph::io_exerciser::IoOp>
ceph::io_exerciser::Seq10::Seq10(
std::pair<int, int> obj_size_range, int seed,
std::optional<std::pair<int, int>> km,
- std::optional<std::pair<std::string_view, std::string_view>> mappingLayers)
+ std::optional<std::pair<std::string_view, std::string_view>> mappinglayers)
: EcIoSequence(obj_size_range, seed),
offset(0),
length(1),
test_all_sizes(
false) // Only test obj_size(rand()) due to time constraints
{
- select_random_shard_to_inject_write_error(km, mappingLayers);
+ select_random_shard_to_inject_write_error(km, mappinglayers);
// We will inject specifically as part of our sequence in this sequence
setup_inject = false;
if (!test_all_sizes) {
Sequence s, std::pair<int, int> obj_size_range,
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers,
+ mappinglayers,
int seed);
protected:
void select_random_data_shard_to_inject_read_error(
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers);
+ mappinglayers);
void select_random_data_shard_to_inject_write_error(
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers);
+ mappinglayers);
void select_random_shard_to_inject_read_error(
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers);
+ mappinglayers);
void select_random_shard_to_inject_write_error(
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers);
+ mappinglayers);
void generate_random_read_inject_type();
void generate_random_write_inject_type();
};
std::pair<int, int> obj_size_range, int seed, Sequence s,
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers);
+ mappinglayers);
Sequence get_id() const override;
std::string get_name() const override;
private:
std::unique_ptr<IoSequence> child_sequence;
- std::unique_ptr<IoOp> nextOp;
+ std::unique_ptr<IoOp> next_op;
};
class Seq10 : public EcIoSequence {
Seq10(std::pair<int, int> obj_size_range, int seed,
std::optional<std::pair<int, int>> km,
std::optional<std::pair<std::string_view, std::string_view>>
- mappingLayers);
+ mappinglayers);
Sequence get_id() const override;
std::string get_name() const override;
po::validators::check_first_occurrence(v);
const std::string& s = po::validators::get_single_string(values);
- const std::string_view* pluginIt =
- std::find(ceph::io_sequence::tester::pluginChoices.begin(),
- ceph::io_sequence::tester::pluginChoices.end(), s);
- if (ceph::io_sequence::tester::pluginChoices.end() == pluginIt) {
+ const std::string_view* plugin_iter =
+ std::find(ceph::io_sequence::tester::plugin_choices.begin(),
+ ceph::io_sequence::tester::plugin_choices.end(), s);
+ if (ceph::io_sequence::tester::plugin_choices.end() == plugin_iter) {
throw po::validation_error(po::validation_error::invalid_option_value);
}
- v = boost::any(*pluginIt);
+ v = boost::any(*plugin_iter);
}
constexpr std::string_view usage[] = {
shec::SelectErasureC ssc{rng, vm, profile.plugin, profile.km, first_use};
profile.c = ssc.select();
} else if (profile.plugin == "lrc") {
- std::pair<std::string, std::string> mappingAndLayers = sml.select();
- profile.mapping = mappingAndLayers.first;
- profile.layers = mappingAndLayers.second;
+ std::pair<std::string, std::string> mappinglayers = sml.select();
+ profile.mapping = mappinglayers.first;
+ profile.layers = mappinglayers.second;
}
- ErasureCodeProfile erasureCodeProfile;
- erasureCodeProfile["plugin"] = std::string(profile.plugin);
+ ErasureCodeProfile erasure_code_profile;
+ erasure_code_profile["plugin"] = std::string(profile.plugin);
if (profile.km) {
- erasureCodeProfile["k"] = std::to_string(profile.km->first);
- erasureCodeProfile["m"] = std::to_string(profile.km->second);
+ erasure_code_profile["k"] = std::to_string(profile.km->first);
+ erasure_code_profile["m"] = std::to_string(profile.km->second);
}
if (profile.technique) {
- erasureCodeProfile["technique"] = *profile.technique;
+ erasure_code_profile["technique"] = *profile.technique;
}
if (profile.packet_size) {
- erasureCodeProfile["packetsize"] = std::to_string(*profile.packet_size);
+ erasure_code_profile["packetsize"] = std::to_string(*profile.packet_size);
}
if (profile.c) {
- erasureCodeProfile["c"] = std::to_string(*profile.c);
+ erasure_code_profile["c"] = std::to_string(*profile.c);
}
if (profile.w) {
- erasureCodeProfile["packetsize"] = std::to_string(*profile.w);
+ erasure_code_profile["packetsize"] = std::to_string(*profile.w);
}
if (profile.jerasure_per_chunk_alignment) {
- erasureCodeProfile["jerasure_per_chunk_alignment"] =
+ erasure_code_profile["jerasure_per_chunk_alignment"] =
std::to_string(*profile.jerasure_per_chunk_alignment);
}
if (profile.mapping) {
- erasureCodeProfile["mapping"] = *profile.mapping;
+ erasure_code_profile["mapping"] = *profile.mapping;
}
if (profile.layers) {
- erasureCodeProfile["layers"] = *profile.layers;
+ erasure_code_profile["layers"] = *profile.layers;
}
ErasureCodePluginRegistry& instance = ErasureCodePluginRegistry::instance();
std::stringstream ss;
instance.factory(std::string(profile.plugin),
cct->_conf.get_val<std::string>("erasure_code_dir"),
- erasureCodeProfile, &ec_impl, &ss);
+ erasure_code_profile, &ec_impl, &ss);
ceph_assert(ec_impl);
SelectErasureChunkSize scs{rng, vm, ec_impl, first_use};
bool force =
profile.chunk_size.has_value() && (*(profile.chunk_size) % 4096 != 0);
- ceph::messaging::osd::OSDECProfileSetRequest ecProfileSetRequest{
+ ceph::messaging::osd::OSDECProfileSetRequest ec_profile_set_request{
profile.name, profile_values, force};
int rc =
- send_mon_command(ecProfileSetRequest, rados, "OSDECProfileSetRequest",
+ send_mon_command(ec_profile_set_request, rados, "OSDECProfileSetRequest",
inbl, &outbl, formatter.get());
ceph_assert(rc == 0);
}
bufferlist inbl, outbl;
auto formatter = std::make_shared<JSONFormatter>(false);
- ceph::messaging::osd::OSDECProfileGetRequest osdECProfileGetRequest{
+ ceph::messaging::osd::OSDECProfileGetRequest ec_profile_get_request{
profile_name};
- rc = send_mon_command(osdECProfileGetRequest, rados, "OSDECProfileGetRequest",
+ rc = send_mon_command(ec_profile_get_request, rados, "OSDECProfileGetRequest",
inbl, &outbl, formatter.get());
ceph_assert(rc == 0);
bool success = p.parse(outbl.c_str(), outbl.length());
ceph_assert(success);
- ceph::messaging::osd::OSDPoolGetReply osdPoolGetReply;
- osdPoolGetReply.decode_json(&p);
+ ceph::messaging::osd::OSDPoolGetReply pool_get_reply;
+ pool_get_reply.decode_json(&p);
- profile = sep.selectExistingProfile(osdPoolGetReply.erasure_code_profile);
+ profile = sep.selectExistingProfile(pool_get_reply.erasure_code_profile);
} else {
created_pool_name = create();
}
profile = sep.select();
pool_name = fmt::format("testpool-pr{}", profile->name);
- ceph::messaging::osd::OSDECPoolCreateRequest poolCreateRequest{
+ ceph::messaging::osd::OSDECPoolCreateRequest pool_create_request{
pool_name, "erasure", 8, 8, profile->name};
- rc = send_mon_command(poolCreateRequest, rados, "OSDECPoolCreateRequest",
+ rc = send_mon_command(pool_create_request, rados, "OSDECPoolCreateRequest",
inbl, &outbl, formatter.get());
ceph_assert(rc == 0);
auto formatter = std::make_shared<JSONFormatter>(false);
if (!allow_pool_autoscaling) {
- ceph::messaging::osd::OSDSetRequest setNoAutoscaleRequest{"noautoscale",
+ ceph::messaging::osd::OSDSetRequest no_autoscale_request{"noautoscale",
std::nullopt};
- rc = send_mon_command(setNoAutoscaleRequest, rados, "OSDSetRequest", inbl,
+ rc = send_mon_command(no_autoscale_request, rados, "OSDSetRequest", inbl,
&outbl, formatter.get());
ceph_assert(rc == 0);
}
if (!allow_pool_balancer) {
- ceph::messaging::balancer::BalancerOffRequest balancerOffRequest;
- rc = send_mon_command(balancerOffRequest, rados, "BalancerOffRequest", inbl,
+ ceph::messaging::balancer::BalancerOffRequest balancer_off_request;
+ rc = send_mon_command(balancer_off_request, rados, "BalancerOffRequest", inbl,
&outbl, formatter.get());
ceph_assert(rc == 0);
- ceph::messaging::balancer::BalancerStatusRequest balancerStatusRequest;
- rc = send_mon_command(balancerStatusRequest, rados, "BalancerStatusRequest",
+ ceph::messaging::balancer::BalancerStatusRequest balancer_status_request;
+ rc = send_mon_command(balancer_status_request, rados, "BalancerStatusRequest",
inbl, &outbl, formatter.get());
ceph_assert(rc == 0);
bool success = p.parse(outbl.c_str(), outbl.length());
ceph_assert(success);
- ceph::messaging::balancer::BalancerStatusReply reply;
- reply.decode_json(&p);
- ceph_assert(!reply.active);
+ ceph::messaging::balancer::BalancerStatusReply balancer_status_reply;
+ balancer_status_reply.decode_json(&p);
+ ceph_assert(!balancer_status_reply.active);
}
- if (allow_pool_deep_scrubbing) {
- ceph::messaging::osd::OSDSetRequest setNoDeepScrubRequest{"nodeep-scrub",
+ if (!allow_pool_deep_scrubbing) {
+ ceph::messaging::osd::OSDSetRequest no_deep_scrub_request{"nodeep-scrub",
std::nullopt};
- rc = send_mon_command(setNoDeepScrubRequest, rados, "setNoDeepScrubRequest",
+ rc = send_mon_command(no_deep_scrub_request, rados, "setNoDeepScrubRequest",
inbl, &outbl, formatter.get());
ceph_assert(rc == 0);
}
- if (allow_pool_scrubbing) {
- ceph::messaging::osd::OSDSetRequest setNoScrubRequest{"noscrub",
+ if (!allow_pool_scrubbing) {
+ ceph::messaging::osd::OSDSetRequest no_scrub_request{"noscrub",
std::nullopt};
- rc = send_mon_command(setNoScrubRequest, rados, "OSDSetRequest", inbl,
+ rc = send_mon_command(no_scrub_request, rados, "OSDSetRequest", inbl,
&outbl, formatter.get());
ceph_assert(rc == 0);
}
if (test_recovery) {
- ceph::messaging::config::ConfigSetRequest configSetBluestoreDebugRequest{
+ ceph::messaging::config::ConfigSetRequest bluestore_debug_request{
"global", "bluestore_debug_inject_read_err", "true", std::nullopt};
- rc = send_mon_command(configSetBluestoreDebugRequest, rados,
+ rc = send_mon_command(bluestore_debug_request, rados,
"ConfigSetRequest", inbl, &outbl, formatter.get());
ceph_assert(rc == 0);
- ceph::messaging::config::ConfigSetRequest configSetMaxMarkdownRequest{
+ ceph::messaging::config::ConfigSetRequest max_markdown_request{
"global", "osd_max_markdown_count", "99999999", std::nullopt};
- rc = send_mon_command(configSetMaxMarkdownRequest, rados,
+ rc = send_mon_command(max_markdown_request, rados,
"ConfigSetRequest", inbl, &outbl, formatter.get());
ceph_assert(rc == 0);
}
const std::string pool = spo.select();
if (!dryrun) {
ceph_assert(spo.getProfile());
- poolKM = spo.getProfile()->km;
+ pool_km = spo.getProfile()->km;
if (spo.getProfile()->mapping && spo.getProfile()->layers) {
- poolMappingLayers = {*spo.getProfile()->mapping,
+ pool_mappinglayers = {*spo.getProfile()->mapping,
*spo.getProfile()->layers};
}
}
if (testrecovery) {
seq = ceph::io_exerciser::EcIoSequence::generate_sequence(
- curseq, obj_size_range, poolKM, poolMappingLayers,
+ curseq, obj_size_range, pool_km, pool_mappinglayers,
seqseed.value_or(rng()));
} else {
seq = ceph::io_exerciser::IoSequence::generate_sequence(
} else {
if (testrecovery) {
seq = ceph::io_exerciser::EcIoSequence::generate_sequence(
- curseq, obj_size_range, poolKM, poolMappingLayers,
+ curseq, obj_size_range, pool_km, pool_mappinglayers,
seqseed.value_or(rng()));
} else {
seq = ceph::io_exerciser::IoSequence::generate_sequence(
std::optional<ceph::io_sequence::tester::Profile> profile =
spo.getProfile();
std::optional<std::pair<int, int>> km;
- std::optional<std::pair<std::string_view, std::string_view>> mappingLayers;
+ std::optional<std::pair<std::string_view, std::string_view>> mappinglayers;
if (profile) {
km = profile->km;
if (profile->mapping && profile->layers) {
- mappingLayers = {*spo.getProfile()->mapping, *spo.getProfile()->layers};
+ mappinglayers = {*spo.getProfile()->mapping, *spo.getProfile()->layers};
}
}
seq = ceph::io_exerciser::EcIoSequence::generate_sequence(
- s, obj_size_range, km, mappingLayers, seqseed.value_or(rng()));
+ s, obj_size_range, km, mappinglayers, seqseed.value_or(rng()));
} else {
seq = ceph::io_exerciser::IoSequence::generate_sequence(
s, obj_size_range, seqseed.value_or(rng()));
bufferlist inbl, outbl;
auto formatter = std::make_unique<JSONFormatter>(false);
- ceph::messaging::osd::OSDMapRequest osdMapRequest{pool, object_name, ""};
- int rc = send_mon_command(osdMapRequest, rados, "OSDMapRequest", inbl,
+ ceph::messaging::osd::OSDMapRequest osd_map_request{pool, object_name, ""};
+ int rc = send_mon_command(osd_map_request, rados, "OSDMapRequest", inbl,
&outbl, formatter.get());
ceph_assert(rc == 0);
bool success = p.parse(outbl.c_str(), outbl.length());
ceph_assert(success);
- ceph::messaging::osd::OSDMapReply reply{};
- reply.decode_json(&p);
+ ceph::messaging::osd::OSDMapReply osd_map_reply{};
+ osd_map_reply.decode_json(&p);
model = std::make_unique<ceph::io_exerciser::RadosIo>(
- rados, asio, pool, object_name, reply.acting, sbs.select(), rng(),
+ rados, asio, pool, object_name, osd_map_reply.acting, sbs.select(), rng(),
1, // 1 thread
lock, cond);
}
namespace io_sequence {
namespace tester {
// Choices for min and max object size
-inline static constexpr size_t objectSizeSize = 10;
-inline static constexpr std::array<std::pair<int, int>, objectSizeSize>
- objectSizeChoices = {{{1, 32}, // Default - best for boundary checking
+inline static constexpr size_t object_size_array_size = 10;
+inline static constexpr std::array<std::pair<int, int>, object_size_array_size>
+ object_size_choices = {{{1, 32}, // Default - best for boundary checking
{12, 14},
{28, 30},
{36, 38},
using SelectObjectSize =
ProgramOptionSelector<std::pair<int, int>,
- io_sequence::tester ::objectSizeSize,
- io_sequence::tester ::objectSizeChoices>;
+ io_sequence::tester::object_size_array_size,
+ io_sequence::tester::object_size_choices>;
// Choices for block size
-inline static constexpr int blockSizeSize = 5;
-inline static constexpr std::array<uint64_t, blockSizeSize> blockSizeChoices = {
+inline static constexpr int block_size_array_size = 5;
+inline static constexpr std::array<uint64_t, block_size_array_size> block_size_choices = {
{2048, // Default - test boundaries for EC 4K chunk size
512, 3767, 4096, 32768}};
using SelectBlockSize =
ProgramOptionSelector<uint64_t,
- io_sequence::tester ::blockSizeSize,
- io_sequence::tester ::blockSizeChoices>;
+ io_sequence::tester::block_size_array_size,
+ io_sequence::tester::block_size_choices>;
// Choices for number of threads
-inline static constexpr int threadArraySize = 4;
-inline static constexpr std::array<int, threadArraySize> threadCountChoices = {
+inline static constexpr int thread_array_size = 4;
+inline static constexpr std::array<int, thread_array_size> thread_count_choices = {
{1, // Default
2, 4, 8}};
using SelectNumThreads =
ProgramOptionSelector<int,
- io_sequence::tester ::threadArraySize,
- io_sequence::tester ::threadCountChoices>;
+ io_sequence::tester::thread_array_size,
+ io_sequence::tester::thread_count_choices>;
class SelectSeqRange
: public ProgramOptionReader<std::pair<ceph::io_exerciser ::Sequence,
};
// Choices for plugin
-inline static constexpr int pluginListSize = 5;
-inline static constexpr std::array<std::string_view, pluginListSize>
- pluginChoices = {{"jerasure", "isa", "clay", "shec", "lrc"}};
+inline static constexpr int plugin_array_size = 5;
+inline static constexpr std::array<std::string_view, plugin_array_size>
+ plugin_choices = {{"jerasure", "isa", "clay", "shec", "lrc"}};
using SelectErasurePlugin =
ProgramOptionSelector<std::string_view,
- io_sequence::tester ::pluginListSize,
- io_sequence::tester ::pluginChoices>;
+ io_sequence::tester::plugin_array_size,
+ io_sequence::tester::plugin_choices>;
class SelectErasureKM
: public ProgramOptionGeneratedSelector<std::pair<int, int>> {
namespace lrc {
// Choices for lrc mappings and layers. The index selected for the mapping
// matches what index will be chosen from the layers array.
-inline static constexpr int mappingLayerListSizes = 15;
+inline static constexpr int mapping_layer_array_sizes = 15;
-inline static std::array<std::string, mappingLayerListSizes> mappingChoices = {{
+inline static std::array<std::string, mapping_layer_array_sizes> mapping_choices = {{
"_DD",
"_DDD",
"_DDDD",
"_D_D_DDDD",
}};
-inline static std::array<std::string, mappingLayerListSizes> layerChoices = {{
+inline static std::array<std::string, mapping_layer_array_sizes> layer_choices = {{
"[[\"cDD\",\"\"]]",
"[[\"cDDD\",\"\"]]",
"[[\"cDDDD\",\"\"]]",
using SelectMapping =
ProgramOptionSelector<std::string,
- io_sequence::tester::lrc::mappingLayerListSizes,
- io_sequence::tester::lrc::mappingChoices>;
+ io_sequence::tester::lrc::mapping_layer_array_sizes,
+ io_sequence::tester::lrc::mapping_choices>;
using SelectLayers =
ProgramOptionSelector<std::string,
- io_sequence::tester::lrc::mappingLayerListSizes,
- io_sequence::tester::lrc::layerChoices>;
+ io_sequence::tester::lrc::mapping_layer_array_sizes,
+ io_sequence::tester::lrc::layer_choices>;
class SelectMappingAndLayers {
public:
SelectErasurePlugin spl;
lrc::SelectMappingAndLayers sml;
- std::unique_ptr<ErasureCodePlugin> erasureCode;
+ std::unique_ptr<ErasureCodePlugin> erasure_code;
};
class SelectErasurePool : public ProgramOptionReader<std::string> {
ceph::util::random_number_generator<int>& rng;
bool verbose;
std::optional<int> seqseed;
- std::optional<std::pair<int, int>> poolKM;
+ std::optional<std::pair<int, int>> pool_km;
std::optional<std::pair<std::string_view, std::string_view>>
- poolMappingLayers;
+ pool_mappinglayers;
bool testrecovery;
};