Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
seastar::open_flags mode) {
return seastar::do_with(in_path, [this, mode](auto& in_path) {
return seastar::file_stat(in_path).then([this, mode, in_path](auto stat) {
- super.block_size = stat.block_size;
return seastar::open_file_dma(in_path, mode).then([=, this](auto file) {
device = file;
logger().debug("open");
void set_journal_size(uint64_t size) {
super.journal_size = size;
}
+
+ void set_block_size(size_t size) {
+ super.block_size = size;
+ }
};
using RBMDeviceRef = std::unique_ptr<RBMDevice>;
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);
nvdev_test_block_t original_data;
std::minstd_rand0 generator;
uint8_t value = generator();