]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: log before assert in AvlAllocator 45414/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 Feb 2023 09:46:14 +0000 (12:46 +0300)
Fixes: https://tracker.ceph.com/issues/54579
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
src/os/bluestore/AvlAllocator.cc

index 4584bfae713fdeb353dbc38dda7cd3918cdefa8a..26eba36a0ec20be4f3288d4b970d82c2bd5dbf1a 100644 (file)
@@ -445,27 +445,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);
 }