]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/Allocator: drop unused return value in release function 13913/head
authorwangzhengyong <wangzhengyong@cmss.chinamobile.com>
Fri, 10 Mar 2017 02:06:50 +0000 (10:06 +0800)
committerwangzhengyong <wangzhengyong@cmss.chinamobile.com>
Fri, 10 Mar 2017 02:15:05 +0000 (10:15 +0800)
Signed-off-by: wangzhengyong@cmss.chinamobile.com
src/os/bluestore/Allocator.h
src/os/bluestore/BitMapAllocator.cc
src/os/bluestore/BitMapAllocator.h
src/os/bluestore/StupidAllocator.cc
src/os/bluestore/StupidAllocator.h

index aefb867dc3f3d4ba5354ca9f6e01add0d905b9d0..a93428d9c1b8655d5ff257d34756dc0e4e42205a 100644 (file)
@@ -43,7 +43,7 @@ public:
     return allocate(want_size, alloc_unit, want_size, hint, extents);
   }
 
-  virtual int release(
+  virtual void release(
     uint64_t offset, uint64_t length) = 0;
 
   virtual void dump() = 0;
index d666f8c93a85bc0cff3a696c943afd175e9ec705..a254c34f00b41cad323018338f39c603e335ccc4 100644 (file)
@@ -144,7 +144,7 @@ int64_t BitMapAllocator::allocate_dis(
   return num * m_block_size;
 }
 
-int BitMapAllocator::release(
+void BitMapAllocator::release(
   uint64_t offset, uint64_t length)
 {
   std::lock_guard<std::mutex> l(m_lock);
@@ -152,7 +152,6 @@ int BitMapAllocator::release(
            << std::hex << offset << "~" << length << std::dec
            << dendl;
   insert_free(offset, length);
-  return 0;
 }
 
 uint64_t BitMapAllocator::get_free()
index b2134d06b33bea1a13e323392506b414d9d6c79a..0d0d4ddc5674cc86feccdc41c29b03dccd57c48a 100644 (file)
@@ -36,7 +36,7 @@ public:
     uint64_t want_size, uint64_t alloc_unit, uint64_t max_alloc_size,
     int64_t hint, mempool::bluestore_alloc::vector<AllocExtent> *extents) override;
 
-  int release(
+  void release(
     uint64_t offset, uint64_t length) override;
 
   uint64_t get_free() override;
index d32c878182a328f6e824cb37b24b60bd5e887a05..a16f47ad29b9896d8974222d71ab3b1adc12cd3c 100644 (file)
@@ -239,7 +239,7 @@ int64_t StupidAllocator::allocate(
   return allocated_size;
 }
 
-int StupidAllocator::release(
+void StupidAllocator::release(
   uint64_t offset, uint64_t length)
 {
   std::lock_guard<std::mutex> l(lock);
@@ -247,7 +247,6 @@ int StupidAllocator::release(
           << std::dec << dendl;
   _insert_free(offset, length);
   num_free += length;
-  return 0;
 }
 
 uint64_t StupidAllocator::get_free()
index a051bd0efffe81b2dc592a5618ef25f98560d4b4..6cd93eca73ec20bee444329dfbcee991789819a3 100644 (file)
@@ -39,7 +39,7 @@ public:
     uint64_t want_size, uint64_t alloc_unit, int64_t hint,
     uint64_t *offset, uint32_t *length);
 
-  int release(
+  void release(
     uint64_t offset, uint64_t length) override;
 
   uint64_t get_free() override;