From: xie xingguo Date: Mon, 26 Dec 2016 12:11:22 +0000 (+0800) Subject: os/bluestore/BitAllocator: drop unused parameter from child_check_n_lock() X-Git-Tag: v12.0.0~182^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=abc51c195b2b44006985e3e5d05937916bcf40f2;p=ceph.git os/bluestore/BitAllocator: drop unused parameter from child_check_n_lock() Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BitAllocator.cc b/src/os/bluestore/BitAllocator.cc index 17c9670a7ed5..193cb06f86c7 100644 --- a/src/os/bluestore/BitAllocator.cc +++ b/src/os/bluestore/BitAllocator.cc @@ -813,7 +813,7 @@ void BitMapAreaIN::shutdown() unlock(); } -bool BitMapAreaIN::child_check_n_lock(BitMapArea *child, int64_t required) +bool BitMapAreaIN::child_check_n_lock(BitMapArea *child) { child->lock_shared(); @@ -925,7 +925,7 @@ int64_t BitMapAreaIN::alloc_blocks_dis_int_work(bool wrap, int64_t num_blocks, i m_child_list, hint / m_child_size_blocks, wrap); while ((child = (BitMapArea *) iter.next())) { - if (!child_check_n_lock(child, 1)) { + if (!child_check_n_lock(child)) { hint = 0; continue; } @@ -1114,7 +1114,7 @@ BitMapAreaLeaf::~BitMapAreaLeaf() unlock(); } -bool BitMapAreaLeaf::child_check_n_lock(BitMapArea *child, int64_t required, bool lock) +bool BitMapAreaLeaf::child_check_n_lock(BitMapArea *child, bool lock) { if (lock) { child->lock_excl(); @@ -1145,7 +1145,7 @@ int64_t BitMapAreaLeaf::alloc_blocks_dis_int(int64_t num_blocks, int64_t min_all m_child_list, hint / m_child_size_blocks, false); while ((child = (BitMapArea *) iter.next())) { - if (!child_check_n_lock(child, 1, false)) { + if (!child_check_n_lock(child, false)) { hint = 0; continue; } @@ -1328,7 +1328,7 @@ void BitAllocator::serial_unlock() } } -bool BitAllocator::child_check_n_lock(BitMapArea *child, int64_t required) +bool BitAllocator::child_check_n_lock(BitMapArea *child) { child->lock_shared(); diff --git a/src/os/bluestore/BitAllocator.h b/src/os/bluestore/BitAllocator.h index bb4789b83244..028899929cc6 100644 --- a/src/os/bluestore/BitAllocator.h +++ b/src/os/bluestore/BitAllocator.h @@ -212,11 +212,11 @@ public: static int64_t get_level_factor(CephContext* cct, int level); virtual bool is_allocated(int64_t start_block, int64_t num_blocks) = 0; virtual bool is_exhausted() = 0; - virtual bool child_check_n_lock(BitMapArea *child, int64_t required) { + virtual bool child_check_n_lock(BitMapArea *child) { ceph_abort(); return true; } - virtual bool child_check_n_lock(BitMapArea *child, int64_t required, bool lock) { + virtual bool child_check_n_lock(BitMapArea *child, bool lock) { ceph_abort(); return true; } @@ -378,12 +378,12 @@ protected: virtual bool is_allocated(int64_t start_block, int64_t num_blocks); virtual bool is_exhausted(); - bool child_check_n_lock(BitMapArea *child, int64_t required, bool lock) { + bool child_check_n_lock(BitMapArea *child, bool lock) { ceph_abort(); return false; } - virtual bool child_check_n_lock(BitMapArea *child, int64_t required); + virtual bool child_check_n_lock(BitMapArea *child); virtual void child_unlock(BitMapArea *child); virtual void lock_excl() { @@ -451,12 +451,12 @@ public: BitMapAreaLeaf(CephContext* cct, int64_t zone_num, int64_t total_blocks, bool def); - bool child_check_n_lock(BitMapArea *child, int64_t required) { + bool child_check_n_lock(BitMapArea *child) { ceph_abort(); return false; } - bool child_check_n_lock(BitMapArea *child, int64_t required, bool lock); + bool child_check_n_lock(BitMapArea *child, bool lock); void child_unlock(BitMapArea *child); int64_t alloc_blocks_int(int64_t num_blocks, int64_t hint, int64_t *start_block); @@ -487,7 +487,7 @@ private: } using BitMapArea::child_check_n_lock; - bool child_check_n_lock(BitMapArea *child, int64_t required); + bool child_check_n_lock(BitMapArea *child); virtual void child_unlock(BitMapArea *child); void serial_lock();