From 82968f1e282ec7fbe6577336e8d0d5f81ab93e89 Mon Sep 17 00:00:00 2001 From: wangzhengyong Date: Fri, 10 Mar 2017 10:06:50 +0800 Subject: [PATCH] os/bluestore/Allocator: drop unused return value in release function Signed-off-by: wangzhengyong@cmss.chinamobile.com --- src/os/bluestore/Allocator.h | 2 +- src/os/bluestore/BitMapAllocator.cc | 3 +-- src/os/bluestore/BitMapAllocator.h | 2 +- src/os/bluestore/StupidAllocator.cc | 3 +-- src/os/bluestore/StupidAllocator.h | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/os/bluestore/Allocator.h b/src/os/bluestore/Allocator.h index aefb867dc3f..a93428d9c1b 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 d666f8c93a8..a254c34f00b 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 b2134d06b33..0d0d4ddc567 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 d32c878182a..a16f47ad29b 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 a051bd0efff..6cd93eca73e 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; -- 2.47.3