]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BitAllocator: kill find_any_free_bits() 12696/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 28 Dec 2016 07:43:28 +0000 (15:43 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 13 Jan 2017 03:52:26 +0000 (11:52 +0800)
Which has no consumers.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BitAllocator.cc
src/os/bluestore/BitAllocator.h

index d7ed7de9c225187e5b34fdf2223b0541947d9f40..14501f0b77f029eba260c9708caca85e823885eb 100644 (file)
@@ -341,37 +341,6 @@ BmapEntry::find_first_set_bits(int64_t required_blocks,
   return allocated;
 }
 
-/*
- * Find N number of free bits in bitmap. Need not be contiguous.
- */
-int BmapEntry::find_any_free_bits(int start_offset, int64_t num_blocks,
-        ExtentList *allocated_blocks, int64_t block_offset, int64_t *scanned)
-{
-  int allocated = 0;
-  int required = num_blocks;
-  int i = 0;
-
-  *scanned = 0;
-
-  if (atomic_fetch() == BmapEntry::full_bmask()) {
-    return 0;
-  }
-
-  /*
-   * Do a serial scan on bitmap.
-   */
-  for (i = start_offset; i < BmapEntry::size() &&
-        allocated < required; i++) {
-    if (check_n_set_bit(i)) {
-      allocated_blocks->add_extents(i + block_offset, 1);
-      allocated++;
-    }
-  }
-
-  *scanned = i - start_offset;
-  return allocated;
-}
-
 void BmapEntry::dump_state(int& count)
 {
   dout(0) << count << ":: 0x" << std::hex << m_bits << dendl;
index 38150fbd40e2ca7301d30d876695b75df34aa7f2..db2ecc405e00b9de1a0a0e844d7daa85af839ca5 100644 (file)
@@ -184,10 +184,6 @@ public:
   int find_first_set_bits(int64_t required_blocks, int bit_offset,
           int *start_offset, int64_t *scanned);
 
-  int find_any_free_bits(int start_offset, int64_t num_blocks,
-        ExtentList *alloc_list, int64_t block_offset,
-        int64_t *scanned);
-
   void dump_state(int& count);
   ~BmapEntry();