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;
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);
<< std::hex << offset << "~" << length << std::dec
<< dendl;
insert_free(offset, length);
- return 0;
}
uint64_t BitMapAllocator::get_free()
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;
return allocated_size;
}
-int StupidAllocator::release(
+void StupidAllocator::release(
uint64_t offset, uint64_t length)
{
std::lock_guard<std::mutex> l(lock);
<< std::dec << dendl;
_insert_free(offset, length);
num_free += length;
- return 0;
}
uint64_t StupidAllocator::get_free()
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;