]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BitAllocator: drop unused parameter from child_check_n_lock()
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 26 Dec 2016 12:11:22 +0000 (20:11 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 29 Dec 2016 11:25:50 +0000 (19:25 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BitAllocator.cc
src/os/bluestore/BitAllocator.h

index 17c9670a7ed5ba22dc74f28d3cb2c26bd13c7053..193cb06f86c7a0da5419431bc0df9f298d565999 100644 (file)
@@ -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();
 
index bb4789b832442309ec4d20790e2403294c73d099..028899929cc6e749aef18e80b76ec9eacd1c2c85 100644 (file)
@@ -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();