Add atomic_write_size parameter
This commit is contained in:
@@ -49,6 +49,8 @@ void blockstore_disk_t::parse_config(std::map<std::string, std::string> & config
|
||||
meta_block_target_free_space = parse_size(config["meta_block_target_free_space"]);
|
||||
bitmap_granularity = parse_size(config["bitmap_granularity"]);
|
||||
meta_format = stoull_full(config["meta_format"]);
|
||||
atomic_write_size = (config.find("atomic_write_size") != config.end()
|
||||
? parse_size(config["atomic_write_size"]) : 4096);
|
||||
if (config.find("data_io") == config.end() &&
|
||||
config.find("meta_io") == config.end() &&
|
||||
config.find("journal_io") == config.end())
|
||||
|
||||
@@ -30,6 +30,8 @@ struct blockstore_disk_t
|
||||
uint32_t journal_block_size = 4096;
|
||||
// Metadata block size - minimum_io_size of the metadata device is the best choice
|
||||
uint32_t meta_block_size = 4096;
|
||||
// Atomic write size of the data block device
|
||||
uint32_t atomic_write_size = 4096;
|
||||
// Target free space in metadata blocks
|
||||
uint32_t meta_block_target_free_space = 800;
|
||||
// Sparse write tracking granularity. 4 KB is a good choice. Must be a multiple of disk_alignment
|
||||
|
||||
@@ -150,7 +150,7 @@ int blockstore_impl_t::dequeue_write(blockstore_op_t *op)
|
||||
// parallel writes to the same object are forbidden anyway
|
||||
else if (dsk.disable_data_fsync &&
|
||||
op->opcode == BS_OP_WRITE_STABLE &&
|
||||
op->len > 0 && op->len <= dsk.bitmap_granularity /* FIXME atomic_write_size */ &&
|
||||
op->len > 0 && op->len <= dsk.atomic_write_size &&
|
||||
(obj->get_writes()->flags == (BS_HEAP_BIG_WRITE|BS_HEAP_STABLE) ||
|
||||
obj->get_writes()->flags == (BS_HEAP_INTENT_WRITE|BS_HEAP_STABLE)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user