From: Radoslaw Zarzynski Date: Wed, 1 Mar 2017 23:14:04 +0000 (+0100) Subject: os/bluestore: remove the unused BitMapArea::m_type and related stuff. X-Git-Tag: v12.0.2~240^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8352d6ab27386555ec2d0c9cf0aad93649739cb5;p=ceph.git os/bluestore: remove the unused BitMapArea::m_type and related stuff. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/os/bluestore/BitAllocator.cc b/src/os/bluestore/BitAllocator.cc index fb141c8b291f..d2a2fb3149f6 100644 --- a/src/os/bluestore/BitAllocator.cc +++ b/src/os/bluestore/BitAllocator.cc @@ -245,7 +245,6 @@ void BitMapZone::init(CephContext* const cct, m_area_index = zone_num; BitMapZone::total_blocks = total_blocks; alloc_assert(size() > 0); - m_type = ZONE; m_used_blocks = def? total_blocks: 0; @@ -551,17 +550,6 @@ int64_t BitMapArea::get_span_size(CephContext* cct) return cct->_conf->bluestore_bitmapallocator_span_size; } -bmap_area_type_t BitMapArea::level_to_type(int level) -{ - if (level == 0) { - return ZONE; - } else if (level == 1) { - return LEAF; - } else { - return NON_LEAF; - } -} - int BitMapArea::get_level(CephContext* cct, int64_t total_blocks) { int level = 1; @@ -598,11 +586,6 @@ int64_t BitMapArea::get_index() return m_area_index; } -bmap_area_type_t BitMapArea::get_type() -{ - return m_type; -} - /* * BitMapArea Leaf and Internal */ @@ -620,7 +603,6 @@ void BitMapAreaIN::init_common(CephContext* const cct, m_area_index = area_idx; m_total_blocks = total_blocks; m_level = BitMapArea::get_level(cct, total_blocks); - m_type = BitMapArea::level_to_type(m_level); m_reserved_blocks = 0; m_used_blocks = def? total_blocks: 0; diff --git a/src/os/bluestore/BitAllocator.h b/src/os/bluestore/BitAllocator.h index 9b50e8fae810..86b9d0671973 100644 --- a/src/os/bluestore/BitAllocator.h +++ b/src/os/bluestore/BitAllocator.h @@ -188,23 +188,14 @@ public: }; -typedef enum bmap_area_type { - UNDEFINED = 0, - ZONE = 1, - LEAF = 2, - NON_LEAF = 3 -} bmap_area_type_t; - class BitMapArea { protected: int16_t m_area_index; - bmap_area_type_t m_type; public: MEMPOOL_CLASS_HELPERS(); static int64_t get_zone_size(CephContext* cct); static int64_t get_span_size(CephContext* cct); - bmap_area_type_t level_to_type(int level); static int get_level(CephContext* cct, int64_t total_blocks); static int64_t get_level_factor(CephContext* cct, int level); virtual bool is_allocated(int64_t start_block, int64_t num_blocks) = 0; @@ -254,11 +245,8 @@ public: int64_t child_count(); int64_t get_index(); int64_t get_level(); - bmap_area_type_t get_type(); virtual void dump_state(CephContext* cct, int& count) = 0; - BitMapArea(CephContext*) - : m_type(UNDEFINED) { - } + BitMapArea(CephContext*) { } virtual ~BitMapArea() { } };