bool can_delay_allocation(device_type_t type);
device_type_t string_to_device_type(std::string type);
-/* Monotonically increasing identifier for the location of a
+enum class journal_type_t {
+ SEGMENTED,
+ CIRCULAR
+};
+
+/**
+ * Monotonically increasing identifier for the location of a
* journal_record.
*/
// JOURNAL_SEQ_NULL == JOURNAL_SEQ_MAX == journal_seq_t{}
seastar::future<> set_up_fut() final {
std::string j_type = GetParam();
if (j_type == "segmented") {
- return tm_setup(journal_type_t::SEGMENT_JOURNAL);
+ return tm_setup(journal_type_t::SEGMENTED);
} else if (j_type == "circularbounded") {
- return tm_setup(journal_type_t::CIRCULARBOUNDED_JOURNAL);
+ return tm_setup(journal_type_t::CIRCULAR);
} else {
ceph_assert(0 == "no support");
}
}
seastar::future<> tm_setup(
- journal_type_t type = journal_type_t::SEGMENT_JOURNAL) {
+ journal_type_t type = journal_type_t::SEGMENTED) {
LOG_PREFIX(EphemeralTestState::tm_setup);
SUBINFO(test, "begin with {} devices ...", get_num_devices());
journal_type = type;
// FIXME: should not initialize segment_manager with circularbounded-journal
- if (journal_type == journal_type_t::SEGMENT_JOURNAL) {
+ if (journal_type == journal_type_t::SEGMENTED) {
return segment_setup();
} else {
- assert(journal_type == journal_type_t::CIRCULARBOUNDED_JOURNAL);
+ assert(journal_type == journal_type_t::CIRCULAR);
return randomblock_setup();
}
}
for (auto &sec_sm : secondary_segment_managers) {
sec_devices.emplace_back(sec_sm.get());
}
- if (journal_type == journal_type_t::CIRCULARBOUNDED_JOURNAL) {
+ if (journal_type == journal_type_t::CIRCULAR) {
// FIXME: should not initialize segment_manager with circularbounded-journal
// FIXME: no secondary device in the single device test
sec_devices.emplace_back(segment_manager.get());
}
virtual FuturizedStore::mkfs_ertr::future<> _mkfs() {
- if (journal_type == journal_type_t::SEGMENT_JOURNAL) {
+ if (journal_type == journal_type_t::SEGMENTED) {
return tm->mkfs(
).handle_error(
crimson::ct_error::assert_all{"Error in mkfs"}