static const char* KEYS[] = {
"bluestore_csum",
"bluestore_csum_type",
+ "bluestore_min_alloc_size",
NULL
};
return KEYS;
<< bluestore_blob_t::get_csum_type_string(csum_type)
<< dendl;
}
+ if (changed.count("bluestore_min_alloc_size")) {
+ min_alloc_size = g_conf->bluestore_min_alloc_size;
+ }
}
void BlueStore::_init_logger()
block_size = bdev->get_block_size();
block_mask = ~(block_size - 1);
block_size_order = 0;
- for (uint64_t t = 1; t < block_size; ++t) {
+ for (uint64_t t = 1; t < block_size; t <<= 1) {
++block_size_order;
}
return 0;
uint64_t block_mask; ///< mask to get just the block offset
size_t block_size_order; ///< bits to shift to get block size
+ uint64_t min_alloc_size; ///< minimum allocation unit (power of 2)
+
// --------------------------------------------------------
// private methods