From 49c164573fbe57696350621e13c8a2b4f251961c Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Tue, 11 Jun 2019 20:31:32 +0300 Subject: [PATCH] os/bluestore: BitmapAllocator::allocate: log new extents only Signed-off-by: Igor Fedotov (cherry picked from commit a90d57ca05c902eab8ca19090b856ea0e08f5d2b) --- src/os/bluestore/BitmapAllocator.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/os/bluestore/BitmapAllocator.cc b/src/os/bluestore/BitmapAllocator.cc index e40153ddfdda..7c0d86a86bea 100755 --- a/src/os/bluestore/BitmapAllocator.cc +++ b/src/os/bluestore/BitmapAllocator.cc @@ -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 -- 2.47.3