]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: use bdev_block_size instead of min_alloc_size for allocators
authorSage Weil <sage@redhat.com>
Fri, 20 May 2016 19:25:39 +0000 (15:25 -0400)
committerSage Weil <sage@redhat.com>
Wed, 1 Jun 2016 15:40:47 +0000 (11:40 -0400)
min_alloc_size is more dynamic; we just need the block size unit here.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BitMapAllocator.cc
src/os/bluestore/StupidAllocator.cc

index 846ba6bc249a74596755bde875e78a980ceea989..9b7ad9091bfd498a1e90235d1598175a14fca18a 100644 (file)
@@ -24,7 +24,7 @@ BitMapAllocator::BitMapAllocator(int64_t device_size)
   : 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;
index 584c310da712d043be2c7049dc10c404d8a12a91..ae2cd0039da8549471b8c29402d7d8f736ae91f1 100644 (file)
@@ -25,7 +25,7 @@ StupidAllocator::~StupidAllocator()
 
 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;