Skip to content

Commit

Permalink
os/bluestore: drop support for non-bulky extent release.
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
  • Loading branch information
rzarzynski committed Sep 29, 2017
1 parent 5e1e6f9 commit 90bbcd7
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 26 deletions.
3 changes: 0 additions & 3 deletions src/os/bluestore/Allocator.h
Expand Up @@ -43,9 +43,6 @@ class Allocator {
return allocate(want_size, alloc_unit, want_size, hint, extents);
}

virtual void release(
uint64_t offset, uint64_t length) = 0;

/* Bulk release. Implementations may override this method to handle the whole
* set at once. This could save e.g. unnecessary mutex dance. */
virtual void release(const interval_set<uint64_t>& release_set) = 0;
Expand Down
9 changes: 0 additions & 9 deletions src/os/bluestore/BitMapAllocator.cc
Expand Up @@ -145,15 +145,6 @@ int64_t BitMapAllocator::allocate_dis(
return num * m_block_size;
}

void BitMapAllocator::release(
uint64_t offset, uint64_t length)
{
dout(10) << __func__ << " 0x"
<< std::hex << offset << "~" << length << std::dec
<< dendl;
insert_free(offset, length);
}

void BitMapAllocator::release(
const interval_set<uint64_t>& release_set)
{
Expand Down
2 changes: 0 additions & 2 deletions src/os/bluestore/BitMapAllocator.h
Expand Up @@ -35,8 +35,6 @@ 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;

void release(
uint64_t offset, uint64_t length) override;
void release(
const interval_set<uint64_t>& release_set) override;

Expand Down
10 changes: 0 additions & 10 deletions src/os/bluestore/StupidAllocator.cc
Expand Up @@ -241,16 +241,6 @@ int64_t StupidAllocator::allocate(
return allocated_size;
}

void StupidAllocator::release(
uint64_t offset, uint64_t length)
{
std::lock_guard<std::mutex> l(lock);
ldout(cct, 10) << __func__ << " 0x" << std::hex << offset << "~" << length
<< std::dec << dendl;
_insert_free(offset, length);
num_free += length;
}

void StupidAllocator::release(
const interval_set<uint64_t>& release_set)
{
Expand Down
2 changes: 0 additions & 2 deletions src/os/bluestore/StupidAllocator.h
Expand Up @@ -46,8 +46,6 @@ class StupidAllocator : public Allocator {
uint64_t want_size, uint64_t alloc_unit, int64_t hint,
uint64_t *offset, uint32_t *length);

void release(
uint64_t offset, uint64_t length) override;
void release(
const interval_set<uint64_t>& release_set) override;

Expand Down

0 comments on commit 90bbcd7

Please sign in to comment.