From: Igor Fedotov Date: Tue, 11 Jun 2019 17:31:32 +0000 (+0300) Subject: os/bluestore: BitmapAllocator::allocate: log new extents only X-Git-Tag: v13.2.7~282^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F28645%2Fhead;p=ceph.git os/bluestore: BitmapAllocator::allocate: log new extents only Signed-off-by: Igor Fedotov (cherry picked from commit a90d57ca05c902eab8ca19090b856ea0e08f5d2b) --- 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