From: wangzhengyong Date: Fri, 10 Mar 2017 02:06:50 +0000 (+0800) Subject: os/bluestore/Allocator: drop unused return value in release function X-Git-Tag: v12.0.1~74^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F13913%2Fhead;p=ceph.git os/bluestore/Allocator: drop unused return value in release function Signed-off-by: wangzhengyong@cmss.chinamobile.com --- diff --git a/src/os/bluestore/Allocator.h b/src/os/bluestore/Allocator.h index aefb867dc3f3..a93428d9c1b8 100644 --- a/src/os/bluestore/Allocator.h +++ b/src/os/bluestore/Allocator.h @@ -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; diff --git a/src/os/bluestore/BitMapAllocator.cc b/src/os/bluestore/BitMapAllocator.cc index d666f8c93a85..a254c34f00b4 100644 --- a/src/os/bluestore/BitMapAllocator.cc +++ b/src/os/bluestore/BitMapAllocator.cc @@ -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 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() diff --git a/src/os/bluestore/BitMapAllocator.h b/src/os/bluestore/BitMapAllocator.h index b2134d06b33b..0d0d4ddc5674 100644 --- a/src/os/bluestore/BitMapAllocator.h +++ b/src/os/bluestore/BitMapAllocator.h @@ -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 *extents) override; - int release( + void release( uint64_t offset, uint64_t length) override; uint64_t get_free() override; diff --git a/src/os/bluestore/StupidAllocator.cc b/src/os/bluestore/StupidAllocator.cc index d32c878182a3..a16f47ad29b9 100644 --- a/src/os/bluestore/StupidAllocator.cc +++ b/src/os/bluestore/StupidAllocator.cc @@ -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 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() diff --git a/src/os/bluestore/StupidAllocator.h b/src/os/bluestore/StupidAllocator.h index a051bd0efffe..6cd93eca73ec 100644 --- a/src/os/bluestore/StupidAllocator.h +++ b/src/os/bluestore/StupidAllocator.h @@ -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;