From 827810d5928fa237bdbbe8c33c67c240cf3e9ae4 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Wed, 16 Mar 2022 13:56:15 +0300 Subject: [PATCH] os/bluestore: log before assert in AvlAllocator Fixes: https://tracker.ceph.com/issues/54579 Signed-off-by: Igor Fedotov (cherry picked from commit f8b3b9a3e48c166723d178029f950ac5753133ff) --- src/os/bluestore/AvlAllocator.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/os/bluestore/AvlAllocator.cc b/src/os/bluestore/AvlAllocator.cc index 9a5fbf33ebb5..75b78c4bd74c 100644 --- a/src/os/bluestore/AvlAllocator.cc +++ b/src/os/bluestore/AvlAllocator.cc @@ -453,27 +453,27 @@ void AvlAllocator::_foreach( void AvlAllocator::init_add_free(uint64_t offset, uint64_t length) { - if (!length) - return; - std::lock_guard l(lock); - ceph_assert(offset + length <= uint64_t(device_size)); ldout(cct, 10) << __func__ << std::hex << " offset 0x" << offset << " length 0x" << length << std::dec << dendl; + if (!length) + return; + std::lock_guard l(lock); + ceph_assert(offset + length <= uint64_t(device_size)); _add_to_tree(offset, length); } void AvlAllocator::init_rm_free(uint64_t offset, uint64_t length) { - if (!length) - return; - std::lock_guard l(lock); - ceph_assert(offset + length <= uint64_t(device_size)); ldout(cct, 10) << __func__ << std::hex << " offset 0x" << offset << " length 0x" << length << std::dec << dendl; + if (!length) + return; + std::lock_guard l(lock); + ceph_assert(offset + length <= uint64_t(device_size)); _remove_from_tree(offset, length); } -- 2.47.3