]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/AvlAllocator: use delegated ctor
authorKefu Chai <kchai@redhat.com>
Tue, 1 Jun 2021 10:52:11 +0000 (18:52 +0800)
committerMauricio Faria de Oliveira <mfo@canonical.com>
Wed, 10 Nov 2021 15:07:56 +0000 (12:07 -0300)
less repeating this way

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9b52ba1dd0a5e199833d7ab2561a7b388d85afc1)
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
 Conflicts:
src/os/bluestore/AvlAllocator.cc
        - Replace `std::string_view name` w/ `const std::string& name`.

src/os/bluestore/AvlAllocator.cc

index 63a6486bfa4af7442f96ddb71edf80447a1f65ba..74d31a858f534793014932bf59c0c3f91afe50cb 100644 (file)
@@ -340,14 +340,7 @@ AvlAllocator::AvlAllocator(CephContext* cct,
                           int64_t device_size,
                           int64_t block_size,
                           const std::string& name) :
-  Allocator(name),
-  num_total(device_size),
-  block_size(block_size),
-  range_size_alloc_threshold(
-    cct->_conf.get_val<uint64_t>("bluestore_avl_alloc_bf_threshold")),
-  range_size_alloc_free_pct(
-    cct->_conf.get_val<uint64_t>("bluestore_avl_alloc_bf_free_pct")),
-  cct(cct)
+  AvlAllocator(cct, device_size, block_size, 0 /* max_mem */, name)
 {}
 
 AvlAllocator::~AvlAllocator()