min_alloc_size is more dynamic; we just need the block size unit here.
Signed-off-by: Sage Weil <sage@redhat.com>
: m_num_uncommitted(0),
m_num_committing(0)
{
- int64_t block_size = g_conf->bluestore_min_alloc_size;
+ int64_t block_size = g_conf->bdev_block_size;
int64_t zone_size_blks = 1024; // Change it later
m_block_size = block_size;
unsigned StupidAllocator::_choose_bin(uint64_t orig_len)
{
- uint64_t len = orig_len / g_conf->bluestore_min_alloc_size;
+ uint64_t len = orig_len / g_conf->bdev_block_size;
int bin = 0;
while (len && bin + 1 < (int)free.size()) {
len >>= 1;