]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/btree: misc consolidations
authorXuehan Xu <xuxuehan@qianxin.com>
Thu, 29 Feb 2024 06:06:35 +0000 (14:06 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Mon, 17 Jun 2024 15:34:08 +0000 (18:34 +0300)
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
(cherry picked from commit 72d721ad72d15296b069752985f12e173f9690da)

src/crimson/os/seastore/btree/fixed_kv_btree.h
src/crimson/os/seastore/lba_manager/btree/lba_btree_node.h

index db6672c74c178029559f36ea30d115e3abbb44b8..dad5a2e438aa5c81a7d4d1945238a2098fe4a125 100644 (file)
@@ -592,6 +592,15 @@ public:
                 : true);
             }
           }
+        } else if (child == get_reserved_ptr()) {
+          if constexpr(
+            !std::is_base_of_v<typename internal_node_t::base_t,
+                               child_node_t>) {
+            assert(i->get_val().pladdr.is_paddr());
+            assert(i->get_val().pladdr.get_paddr() == P_ADDR_ZERO);
+          } else {
+            ceph_abort();
+          }
         }
       } else {
         ceph_abort("impossible");
index 73aa77ab0a5573ab59a5da9f0334649cb411f7f0..c5da860e24ff8c5493474eaaa6417ff5eac17cb6 100644 (file)
@@ -171,6 +171,8 @@ struct LBALeafNode
 
     for (auto i : *this) {
       auto child = (LogicalCachedExtent*)this->children[i.get_offset()];
+      // Children may not be marked as stable yet,
+      // the specific order is undefined in the transaction prepare record phase.
       if (is_valid_child_ptr(child) && child->get_laddr() != i.get_key()) {
        SUBERROR(seastore_fixedkv_tree,
          "stable child not valid: child {}, key {}",