mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
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:
commit
84de8178c2
@ -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;
|
||||
|
@ -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()
|
||||
|
@ -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;
|
||||
|
@ -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()
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user