class SegmentManagerGroup;
class SegmentProvider;
-enum class journal_type {
+enum class journal_type_t {
SEGMENT_JOURNAL = 0,
CIRCULARBOUNDED_JOURNAL
};
virtual ~Journal() {}
- virtual journal_type get_type() = 0;
+ virtual journal_type_t get_type() = 0;
};
using JournalRef = std::unique_ptr<Journal>;
open_for_write_ret open_device_read_header(rbm_abs_addr start);
close_ertr::future<> close() final;
- journal_type get_type() final {
- return journal_type::CIRCULARBOUNDED_JOURNAL;
+ journal_type_t get_type() final {
+ return journal_type_t::CIRCULARBOUNDED_JOURNAL;
}
submit_record_ret submit_record(
write_pipeline = _write_pipeline;
}
- journal_type get_type() final {
- return journal_type::SEGMENT_JOURNAL;
+ journal_type_t get_type() final {
+ return journal_type_t::SEGMENT_JOURNAL;
}
private:
*cache,
config.detailed);
JournalRef journal;
- if (config.j_type == journal_type::SEGMENT_JOURNAL) {
+ if (config.j_type == journal_type_t::SEGMENT_JOURNAL) {
journal = journal::make_segmented(*segment_cleaner);
} else {
journal = journal::make_circularbounded(
struct tm_make_config_t {
bool detailed = true;
- journal_type j_type = journal_type::SEGMENT_JOURNAL;
+ journal_type_t j_type = journal_type_t::SEGMENT_JOURNAL;
placement_hint_t default_placement_hint =
placement_hint_t::HOT;
static tm_make_config_t get_default() {
return tm_make_config_t {
true,
- journal_type::SEGMENT_JOURNAL,
+ journal_type_t::SEGMENT_JOURNAL,
placement_hint_t::HOT
};
}
if (j_type == "segmented") {
return tm_setup(tm_config);
} else if (j_type == "circularbounded") {
- tm_config.j_type = journal_type::CIRCULARBOUNDED_JOURNAL;
+ tm_config.j_type = journal_type_t::CIRCULARBOUNDED_JOURNAL;
tm_config.default_placement_hint = placement_hint_t::REWRITE;
return tm_setup(tm_config);
} else {
for (auto &sec_sm : secondary_segment_managers) {
sec_sm = segment_manager::create_test_ephemeral();
}
- if (tm_config.j_type == journal_type::CIRCULARBOUNDED_JOURNAL) {
+ if (tm_config.j_type == journal_type_t::CIRCULARBOUNDED_JOURNAL) {
auto config =
journal::CircularBoundedJournal::mkfs_config_t::get_default();
rb_device.reset(new nvme_device::TestMemory(config.total_size));
virtual void _init() override {
tm = make_transaction_manager(tm_config);
tm->add_device(segment_manager.get(), true);
- if (tm_config.j_type == journal_type::CIRCULARBOUNDED_JOURNAL) {
+ if (tm_config.j_type == journal_type_t::CIRCULARBOUNDED_JOURNAL) {
tm->add_device(rb_device.get(), false);
static_cast<journal::CircularBoundedJournal*>(tm->get_journal())->
add_device(rb_device.get());
}
virtual FuturizedStore::mkfs_ertr::future<> _mkfs() {
- if (tm_config.j_type == journal_type::SEGMENT_JOURNAL) {
+ if (tm_config.j_type == journal_type_t::SEGMENT_JOURNAL) {
return tm->mkfs(
).handle_error(
crimson::ct_error::assert_all{"Error in mkfs"}