]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: BitmapAllocator::allocate: log new extents only 28645/head
authorIgor Fedotov <ifedotov@suse.com>
Tue, 11 Jun 2019 17:31:32 +0000 (20:31 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Wed, 19 Jun 2019 08:55:15 +0000 (11:55 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit a90d57ca05c902eab8ca19090b856ea0e08f5d2b)

src/os/bluestore/BitmapAllocator.cc

index e40153ddfdda5ba49c3f32e5fe025720a5bf2e86..7c0d86a86bea291b1154d77fc1313776f2ccfe9c 100755 (executable)
@@ -23,7 +23,7 @@ int64_t BitmapAllocator::allocate(
   int64_t hint, PExtentVector *extents)
 {
   uint64_t allocated = 0;
-
+  size_t old_size = extents->size();
   ldout(cct, 10) << __func__ << std::hex << " 0x" << want_size
                 << "/" << alloc_unit << "," << max_alloc_size << "," << hint
                 << std::dec << dendl;
@@ -34,7 +34,8 @@ int64_t BitmapAllocator::allocate(
   if (!allocated) {
     return -ENOSPC;
   }
-  for (auto e : *extents) {
+  for (auto i = old_size; i < extents->size(); ++i) {
+    auto& e = (*extents)[i];
     ldout(cct, 10) << __func__
                    << " extent: 0x" << std::hex << e.offset << "~" << e.length
                   << "/" << alloc_unit << "," << max_alloc_size << "," << hint