Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/os/bluestore/Allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Allocator {
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;
Expand Down
3 changes: 1 addition & 2 deletions src/os/bluestore/BitMapAllocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,14 @@ 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);
dout(10) << __func__ << " 0x"
<< std::hex << offset << "~" << length << std::dec
<< dendl;
insert_free(offset, length);
return 0;
}

uint64_t BitMapAllocator::get_free()
Expand Down
2 changes: 1 addition & 1 deletion src/os/bluestore/BitMapAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class BitMapAllocator : public Allocator {
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;
Expand Down
3 changes: 1 addition & 2 deletions src/os/bluestore/StupidAllocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,14 @@ 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);
dout(10) << __func__ << " 0x" << std::hex << offset << "~" << length
<< std::dec << dendl;
_insert_free(offset, length);
num_free += length;
return 0;
}

uint64_t StupidAllocator::get_free()
Expand Down
2 changes: 1 addition & 1 deletion src/os/bluestore/StupidAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class StupidAllocator : public Allocator {
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;
Expand Down