target_alloc_bytes = 2 * roll_size;
max_journal_bytes = 16 * roll_size;
} else {
- assert(type == journal_type_t::CIRCULAR);
+ assert(type == journal_type_t::RANDOM_BLOCK);
target_dirty_bytes = roll_size / 4;
target_alloc_bytes = roll_size / 4;
max_journal_bytes = roll_size / 2;
target_alloc_bytes = 2 * roll_size;
max_journal_bytes = 4 * roll_size;
} else {
- assert(type == journal_type_t::CIRCULAR);
+ assert(type == journal_type_t::RANDOM_BLOCK);
target_dirty_bytes = roll_size / 4;
target_alloc_bytes = roll_size / 4;
max_journal_bytes = roll_size / 2;
ERROR("identified delta crc {} doesn't match the extent at {} {}, "
"probably is out-dated -- {}",
delta, journal_seq, record_base, *extent);
- ceph_assert(epm.get_journal_type() == journal_type_t::CIRCULAR);
+ ceph_assert(epm.get_journal_type() == journal_type_t::RANDOM_BLOCK);
remove_extent(extent);
return replay_delta_ertr::make_ready_future<bool>(false);
}
{
ceph_assert(primary_device == nullptr);
primary_device = device;
- if (device->get_device_type() == device_type_t::SEGMENTED) {
+ if (device->get_device_type() == device_type_t::SSD) {
prefer_ool = false;
ceph_assert(devices_by_id[device->get_device_id()] == device);
} else {
// RBM device is not in the cleaner.
- ceph_assert(device->get_device_type() == device_type_t::RANDOM_BLOCK);
+ ceph_assert(device->get_device_type() == device_type_t::RANDOM_BLOCK_SSD);
prefer_ool = true;
add_device(primary_device);
}
// Testing interfaces
void test_init_no_background(Device *test_device) {
- assert(test_device->get_device_type() == device_type_t::SEGMENTED);
+ assert(test_device->get_device_type() == device_type_t::SSD);
add_device(test_device);
set_primary_device(test_device);
}
close_ertr::future<> close() final;
journal_type_t get_type() final {
- return journal_type_t::CIRCULAR;
+ return journal_type_t::RANDOM_BLOCK;
}
submit_record_ret submit_record(
}
device_type_t get_device_type() const final {
- return device_type_t::RANDOM_BLOCK;
+ return device_type_t::RANDOM_BLOCK_SSD;
}
const seastore_meta_t &get_meta() const final {
true,
device_spec_t{
(magic_t)std::rand(),
- device_type_t::SEGMENTED,
+ device_type_t::SSD,
0},
seastore_meta_t{new_osd_fsid},
sds}
if (type == journal_type_t::SEGMENTED) {
joff = offset.as_seg_paddr().get_segment_off();
} else {
- assert(type == journal_type_t::CIRCULAR);
+ assert(type == journal_type_t::RANDOM_BLOCK);
auto boff = offset.as_blk_paddr().get_block_off();
assert(boff <= MAX_SEG_OFF);
joff = boff;
ret += (static_cast<int64_t>(offset.as_seg_paddr().get_segment_off()) -
static_cast<int64_t>(r.offset.as_seg_paddr().get_segment_off()));
} else {
- assert(type == journal_type_t::CIRCULAR);
+ assert(type == journal_type_t::RANDOM_BLOCK);
ret += (static_cast<int64_t>(offset.as_blk_paddr().get_block_off()) -
static_cast<int64_t>(r.offset.as_blk_paddr().get_block_off()));
}
ceph_assert(first_segment_offset > tracker_offset &&
first_segment_offset % block_size == 0);
ceph_assert(config.spec.magic != 0);
- ceph_assert(config.spec.dtype == device_type_t::SEGMENTED);
+ ceph_assert(config.spec.dtype == device_type_t::SSD);
ceph_assert(config.spec.id <= DEVICE_ID_MAX_VALID);
if (!config.major_dev) {
ceph_assert(config.secondary_devices.size() == 0);
class SegmentManager : public Device {
public:
device_type_t get_device_type() const final {
- return device_type_t::SEGMENTED;
+ return device_type_t::SSD;
}
using open_ertr = crimson::errorator<
{
assert(num_devices > index);
magic_t magic = 0xabcd;
- auto type = device_type_t::SEGMENTED;
+ auto type = device_type_t::SEGMENTED_EPHEMERAL;
bool is_major_device;
secondary_device_set_t secondary_devices;
if (index == 0) {
auto backref_manager = create_backref_manager(*cache);
auto p_device_type = primary_device->get_device_type();
- ceph_assert(p_device_type == device_type_t::SEGMENTED ||
- p_device_type == device_type_t::RANDOM_BLOCK);
+ ceph_assert(p_device_type == device_type_t::SSD ||
+ p_device_type == device_type_t::RANDOM_BLOCK_SSD);
- if (p_device_type == device_type_t::SEGMENTED) {
+ if (p_device_type == device_type_t::SSD) {
sms->add_segment_manager(static_cast<SegmentManager*>(primary_device));
}
for (auto &p_dev : secondary_devices) {
- ceph_assert(p_dev->get_device_type() == device_type_t::SEGMENTED);
+ ceph_assert(p_dev->get_device_type() == device_type_t::SSD);
sms->add_segment_manager(static_cast<SegmentManager*>(p_dev));
}
- auto journal_type = (p_device_type == device_type_t::SEGMENTED ?
- journal_type_t::SEGMENTED : journal_type_t::CIRCULAR);
+ auto journal_type = (p_device_type == device_type_t::SSD ?
+ journal_type_t::SEGMENTED : journal_type_t::RANDOM_BLOCK);
seastore_off_t roll_size;
seastore_off_t roll_start;
if (journal_type == journal_type_t::SEGMENTED) {
device_config_t{
true,
(magic_t)std::rand(),
- device_type_t::SEGMENTED,
+ device_type_t::SSD,
0,
meta,
secondary_device_set_t()});
if (j_type == "segmented") {
return tm_setup(journal_type_t::SEGMENTED);
} else if (j_type == "circularbounded") {
- return tm_setup(journal_type_t::CIRCULAR);
+ return tm_setup(journal_type_t::RANDOM_BLOCK);
} else {
ceph_assert(0 == "no support");
}
if (journal_type == journal_type_t::SEGMENTED) {
return segment_setup();
} else {
- assert(journal_type == journal_type_t::CIRCULAR);
+ assert(journal_type == journal_type_t::RANDOM_BLOCK);
return randomblock_setup();
}
}
for (auto &sec_sm : secondary_segment_managers) {
sec_devices.emplace_back(sec_sm.get());
}
- if (journal_type == journal_type_t::CIRCULAR) {
+ if (journal_type == journal_type_t::RANDOM_BLOCK) {
// 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());