]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: BitmapAllocator::allocate: log new extents only 28644/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:47:24 +0000 (11:47 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit a90d57ca05c902eab8ca19090b856ea0e08f5d2b)

src/os/bluestore/BitmapAllocator.cc

index 1f2310d7f5a4a0b8ed192b91b2b8d85a333c8502..d632d5fab8772be69474b1781a3491614310d24f 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