]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: log before assert in AvlAllocator 50321/head
authorIgor Fedotov <ifedotov@suse.com>
Wed, 16 Mar 2022 10:56:15 +0000 (13:56 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Wed, 1 Mar 2023 10:17:18 +0000 (13:17 +0300)
Fixes: https://tracker.ceph.com/issues/54579
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
(cherry picked from commit f8b3b9a3e48c166723d178029f950ac5753133ff)

src/os/bluestore/AvlAllocator.cc

index 9a5fbf33ebb5aaf6b72d47c2c10391244332240e..75b78c4bd74c8556baa4640da64c800c32d948a2 100644 (file)
@@ -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);
 }