Merge pull request #13913 from wangzhengyong/release

os/bluestore/Allocator: drop unused return value in release function

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-03-15 13:09:33 -05:00 committed by GitHub
commit 84de8178c2
5 changed files with 5 additions and 7 deletions

View 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;

View 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()

View File

@ -35,7 +35,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;

View 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()

View 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;