]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: don't use virtual for accessing BitMapZone::is_exhausted. 14348/head
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Wed, 5 Apr 2017 00:31:53 +0000 (02:31 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Wed, 5 Apr 2017 15:38:30 +0000 (17:38 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/os/bluestore/BitAllocator.cc
src/os/bluestore/BitAllocator.h

index e8431a76c4e86ac9b26a9d53063236e940c89361..22f1ce9a47d478e9d29107f4549de625540058a4 100644 (file)
@@ -323,7 +323,7 @@ BitMapZone::~BitMapZone()
 inline bool BitMapZone::is_exhausted()
 {
   /* BitMapZone::get_used_blocks operates atomically. No need for lock. */
-  return get_used_blocks() == size();
+  return BitMapZone::get_used_blocks() == BitMapZone::size();
 }
 
 bool BitMapZone::is_allocated(int64_t start_block, int64_t num_blocks)
@@ -989,7 +989,7 @@ inline bool BitMapAreaLeaf::child_check_n_lock(BitMapZone* const child,
   /* The exhausted check can be performed without acquiring the lock. This
    * is because 1) BitMapZone::is_exhausted() actually operates atomically
    * and 2) it's followed by the exclusive, required-aware re-verification. */
-  if (child->is_exhausted()) {
+  if (child->BitMapZone::is_exhausted()) {
     return false;
   }
 
index b1e5457ad04e0bb2d1dd10805b0491702e160e1a..90d9e862cf6aedb712b65f564628e8f836f06baa 100644 (file)
@@ -348,7 +348,7 @@ public:
   static void incr_count() { count++;}
   static int64_t get_total_blocks() {return total_blocks;}
   bool is_allocated(int64_t start_block, int64_t num_blocks) override;
-  bool is_exhausted() override;
+  bool is_exhausted() override final;
   void reset_marker();
 
   int64_t sub_used_blocks(int64_t num_blocks) override;
@@ -356,8 +356,8 @@ public:
   bool reserve_blocks(int64_t num_blocks) override;
   void unreserve(int64_t num_blocks, int64_t allocated) override;
   int64_t get_reserved_blocks() override;
-  int64_t get_used_blocks() override;
-  int64_t size() override {
+  int64_t get_used_blocks() override final;
+  int64_t size() override final {
     return get_total_blocks();
   }