static rbm_abs_addr get_journal_start() {
return RBM_SUPERBLOCK_SIZE;
}
-
- // interfaces for test
- void set_block_size(size_t size) {
- super.block_size = size;
- }
};
using RBMDeviceRef = std::unique_ptr<RBMDevice>;
nvdev_test_block_t
)
+using crimson::common::local_conf;
TEST_F(nvdev_test_t, write_and_verify_test)
{
run_async([this] {
- device.reset(new random_block_device::nvme::NVMeBlockDevice(""));
- device->open(dev_path, seastar::open_flags::rw).unsafe_get();
- device->set_block_size(BLK_SIZE);
+ device.reset(new random_block_device::nvme::NVMeBlockDevice(dev_path));
+ local_conf().set_val("seastore_cbjournal_size", "1000000").get();
+ device->mkfs(
+ device_config_t{
+ true,
+ device_spec_t{
+ (magic_t)std::rand(),
+ device_type_t::RANDOM_BLOCK_SSD,
+ static_cast<device_id_t>(DEVICE_ID_RANDOM_BLOCK_MIN)},
+ seastore_meta_t{uuid_d()},
+ secondary_device_set_t()}
+ ).unsafe_get();
+ device->mount().unsafe_get();
nvdev_test_block_t original_data;
std::minstd_rand0 generator;
uint8_t value = generator();