X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fos%2Fbluestore%2FBitMapAllocator.h;fp=src%2Fceph%2Fsrc%2Fos%2Fbluestore%2FBitMapAllocator.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=a39751d4cf6ad55e7bdf8ece26221d62d3d8f6c3;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/os/bluestore/BitMapAllocator.h b/src/ceph/src/os/bluestore/BitMapAllocator.h deleted file mode 100644 index a39751d..0000000 --- a/src/ceph/src/os/bluestore/BitMapAllocator.h +++ /dev/null @@ -1,51 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef CEPH_OS_BLUESTORE_BITMAPALLOCATOR_H -#define CEPH_OS_BLUESTORE_BITMAPALLOCATOR_H - -#include - -#include "Allocator.h" -#include "BitAllocator.h" -#include "include/btree_interval_set.h" - -class BitMapAllocator : public Allocator { - CephContext* cct; - - int64_t m_block_size; - int64_t m_total_size; - - BitAllocator *m_bit_alloc; // Bit allocator instance - - void insert_free(uint64_t offset, uint64_t len); - - int64_t allocate_dis( - uint64_t want_size, uint64_t alloc_unit, uint64_t max_alloc_size, - int64_t hint, mempool::bluestore_alloc::vector *extents); - -public: - BitMapAllocator(CephContext* cct, int64_t device_size, int64_t block_size); - ~BitMapAllocator() override; - - int reserve(uint64_t need) override; - void unreserve(uint64_t unused) override; - - int64_t allocate( - uint64_t want_size, uint64_t alloc_unit, uint64_t max_alloc_size, - int64_t hint, mempool::bluestore_alloc::vector *extents) override; - - void release( - uint64_t offset, uint64_t length) override; - - uint64_t get_free() override; - - void dump() override; - - void init_add_free(uint64_t offset, uint64_t length) override; - void init_rm_free(uint64_t offset, uint64_t length) override; - - void shutdown() override; -}; - -#endif