]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
remove unused wait argument and related function versions
authorRamesh Chander <Ramesh.Chander@sandisk.com>
Mon, 19 Dec 2016 04:13:58 +0000 (20:13 -0800)
committerRamesh Chander <Ramesh.Chander@sandisk.com>
Mon, 19 Dec 2016 08:17:40 +0000 (00:17 -0800)
Signed-off-by: Ramesh Chander <Ramesh.Chander@sandisk.com>
src/os/bluestore/BitAllocator.cc
src/os/bluestore/BitAllocator.h

index d2ed8102747258b4e3694bd30b62e1003bc9ec35..309d19ae20407f1b90fb373112f16d8edaa298d8 100644 (file)
@@ -908,7 +908,7 @@ bool BitMapAreaIN::is_allocated(int64_t start_block, int64_t num_blocks)
   return true;
 }
 
-int64_t BitMapAreaIN::alloc_blocks_dis_int_work(bool wait, bool wrap, int64_t num_blocks, int64_t min_alloc, 
+int64_t BitMapAreaIN::alloc_blocks_dis_int_work(bool wrap, int64_t num_blocks, int64_t min_alloc, 
            int64_t hint, int64_t area_blk_off, ExtentList *block_list)
 {
   BitMapArea *child = NULL;
@@ -925,7 +925,7 @@ int64_t BitMapAreaIN::alloc_blocks_dis_int_work(bool wait, bool wrap, int64_t nu
     }
 
     blk_off = child->get_index() * m_child_size_blocks + area_blk_off;
-    allocated += child->alloc_blocks_dis(wait, num_blocks - allocated, min_alloc,
+    allocated += child->alloc_blocks_dis(num_blocks - allocated, min_alloc,
                             hint % m_child_size_blocks, blk_off, block_list);
     hint = 0;
     child_unlock(child);
@@ -937,20 +937,20 @@ int64_t BitMapAreaIN::alloc_blocks_dis_int_work(bool wait, bool wrap, int64_t nu
   return allocated;
 }
 
-int64_t BitMapAreaIN::alloc_blocks_dis_int(bool wait, int64_t num_blocks,
-           int64_t min_alloc, int64_t hint, int64_t area_blk_off, ExtentList *block_list)
+int64_t BitMapAreaIN::alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc,
+                       int64_t hint, int64_t area_blk_off, ExtentList *block_list)
 {
-  return alloc_blocks_dis_int_work(wait, false, num_blocks, min_alloc, hint,
+  return alloc_blocks_dis_int_work(false, num_blocks, min_alloc, hint,
                      area_blk_off, block_list);
 }
 
-int64_t BitMapAreaIN::alloc_blocks_dis(bool wait, int64_t num_blocks, int64_t min_alloc,
+int64_t BitMapAreaIN::alloc_blocks_dis(int64_t num_blocks, int64_t min_alloc,
            int64_t hint, int64_t blk_off, ExtentList *block_list)
 {
   int64_t allocated = 0;
 
   lock_shared();
-  allocated += alloc_blocks_dis_int(wait, num_blocks, min_alloc, hint, blk_off, block_list);
+  allocated += alloc_blocks_dis_int(num_blocks, min_alloc, hint, blk_off, block_list);
   add_used_blocks(allocated);
 
   unlock();
@@ -1125,7 +1125,7 @@ void BitMapAreaLeaf::child_unlock(BitMapArea *child)
   child->unlock();
 }
 
-int64_t BitMapAreaLeaf::alloc_blocks_dis_int(bool wait, int64_t num_blocks, int64_t min_alloc, 
+int64_t BitMapAreaLeaf::alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc, 
                                  int64_t hint, int64_t area_blk_off, ExtentList *block_list)
 {
   BitMapArea *child = NULL;
@@ -1395,19 +1395,21 @@ void BitAllocator::set_blocks_used(int64_t start_block, int64_t num_blocks)
 /*
  * Allocate N dis-contiguous blocks.
  */
-int64_t BitAllocator::alloc_blocks_dis_int(bool wait, int64_t num_blocks,
-           int64_t min_alloc, int64_t hint, int64_t area_blk_off, ExtentList *block_list)
+int64_t BitAllocator::alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc,
+                       int64_t hint, int64_t area_blk_off, ExtentList *block_list)
 {
-  return alloc_blocks_dis_int_work(wait, true, num_blocks, min_alloc, hint,
+  return alloc_blocks_dis_int_work(true, num_blocks, min_alloc, hint,
                      area_blk_off, block_list);
 }
 
-int64_t BitAllocator::alloc_blocks_dis_res(int64_t num_blocks, int64_t min_alloc, int64_t hint, ExtentList *block_list)
+int64_t BitAllocator::alloc_blocks_dis_res(int64_t num_blocks, int64_t min_alloc,
+                                           int64_t hint, ExtentList *block_list)
 {
   return alloc_blocks_dis_work(num_blocks, min_alloc, hint, block_list, true);
 }
 
-int64_t BitAllocator::alloc_blocks_dis_work(int64_t num_blocks, int64_t min_alloc, int64_t hint, ExtentList *block_list, bool reserved)
+int64_t BitAllocator::alloc_blocks_dis_work(int64_t num_blocks, int64_t min_alloc,
+                                            int64_t hint, ExtentList *block_list, bool reserved)
 {
   int scans = 1;
   int64_t allocated = 0;
@@ -1436,7 +1438,7 @@ int64_t BitAllocator::alloc_blocks_dis_work(int64_t num_blocks, int64_t min_allo
   }
 
   while (scans && allocated < num_blocks) {
-    allocated += alloc_blocks_dis_int(false, num_blocks - allocated, min_alloc, hint + allocated, blk_off, block_list);
+    allocated += alloc_blocks_dis_int(num_blocks - allocated, min_alloc, hint + allocated, blk_off, block_list);
     scans--;
   }
 
@@ -1450,7 +1452,7 @@ int64_t BitAllocator::alloc_blocks_dis_work(int64_t num_blocks, int64_t min_allo
     unlock();
     lock_excl();
     serial_lock();
-    allocated += alloc_blocks_dis_int(false, num_blocks - allocated, min_alloc, hint + allocated,
+    allocated += alloc_blocks_dis_int(num_blocks - allocated, min_alloc, hint + allocated,
                                       blk_off, block_list);
     if (is_stats_on()) {
       m_stats->add_serial_scans(1);
index 682a40cba2c3819b5789c879c10366f74572ece0..2be2c4e3997cf19d6b385a8d85148ec693760254 100644 (file)
@@ -244,16 +244,12 @@ public:
 
   virtual void shutdown() = 0;
 
-  virtual int64_t alloc_blocks_dis(bool wait, int64_t num_blocks, int64_t min_alloc,
-             int64_t hint, int64_t blk_off, ExtentList *block_list) {
-    ceph_abort();
-    return 0;
-  }
   virtual int64_t alloc_blocks_dis(int64_t num_blocks, int64_t min_alloc,
              int64_t hint, int64_t blk_off, ExtentList *block_list) {
     ceph_abort();
     return 0;
   }
+
   virtual void set_blocks_used(int64_t start_block, int64_t num_blocks) = 0;
   virtual void free_blocks(int64_t start_block, int64_t num_blocks) = 0;
   virtual int64_t size() = 0;
@@ -358,12 +354,6 @@ public:
 
   ~BitMapZone();
   void shutdown();
-
-  virtual int64_t alloc_blocks_dis(bool wait, int64_t num_blocks, int64_t min_alloc,
-             int64_t hint, int64_t blk_off, int64_t *block_list) {
-    ceph_abort();
-    return 0;
-  }
   int64_t alloc_blocks_dis(int64_t num_blocks, int64_t min_alloc, int64_t hint,
         int64_t blk_off, ExtentList *block_list);  
   void set_blocks_used(int64_t start_block, int64_t num_blocks);
@@ -408,7 +398,7 @@ protected:
 
   void init(int64_t total_blocks, int64_t zone_size_block, bool def);
   void init_common(int64_t total_blocks, int64_t zone_size_block, bool def);
-  int64_t alloc_blocks_dis_int_work(bool wait, bool wrap, int64_t num_blocks, int64_t min_alloc, int64_t hint,
+  int64_t alloc_blocks_dis_int_work(bool wrap, int64_t num_blocks, int64_t min_alloc, int64_t hint,
         int64_t blk_off, ExtentList *block_list);  
 
 public:
@@ -430,9 +420,9 @@ public:
   }
   using BitMapArea::alloc_blocks_dis; //non-wait version
 
-  virtual int64_t alloc_blocks_dis_int(bool wait, int64_t num_blocks, int64_t min_alloc, int64_t hint,
+  virtual int64_t alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc, int64_t hint,
         int64_t blk_off, ExtentList *block_list);  
-  virtual int64_t alloc_blocks_dis(bool wait, int64_t num_blocks, int64_t min_alloc, int64_t hint,
+  virtual int64_t alloc_blocks_dis(int64_t num_blocks, int64_t min_alloc, int64_t hint,
         int64_t blk_off, ExtentList *block_list);  
   virtual void set_blocks_used_int(int64_t start_block, int64_t num_blocks);
   virtual void set_blocks_used(int64_t start_block, int64_t num_blocks);
@@ -464,8 +454,8 @@ public:
   bool child_check_n_lock(BitMapArea *child, int64_t required, bool lock);
   void child_unlock(BitMapArea *child);
 
-  int64_t alloc_blocks_int(bool wait, int64_t num_blocks, int64_t hint, int64_t *start_block);
-  int64_t alloc_blocks_dis_int(bool wait, int64_t num_blocks, int64_t min_alloc, int64_t hint,
+  int64_t alloc_blocks_int(int64_t num_blocks, int64_t hint, int64_t *start_block);
+  int64_t alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc, int64_t hint,
         int64_t blk_off, ExtentList *block_list);  
   void free_blocks_int(int64_t start_block, int64_t num_blocks);
 
@@ -507,7 +497,7 @@ private:
                  bmap_alloc_mode_t mode, bool def, bool stats_on);
   int64_t alloc_blocks_dis_work(int64_t num_blocks, int64_t min_alloc, int64_t hint, ExtentList *block_list, bool reserved);
 
-  int64_t alloc_blocks_dis_int(bool wait, int64_t num_blocks, int64_t min_alloc, 
+  int64_t alloc_blocks_dis_int(int64_t num_blocks, int64_t min_alloc, 
            int64_t hint, int64_t area_blk_off, ExtentList *block_list);
 
 public: