Skip to content

Commit

Permalink
crimson/os/seastore/btree: misc consolidations
Browse files Browse the repository at this point in the history
Signed-off-by: Xuehan Xu <[email protected]>
  • Loading branch information
xxhdx1985126 committed May 20, 2024
1 parent fecf501 commit 72d721a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/crimson/os/seastore/btree/fixed_kv_btree.h
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,15 @@ class FixedKVBtree {
: 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");
Expand Down
2 changes: 2 additions & 0 deletions src/crimson/os/seastore/lba_manager/btree/lba_btree_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}",
Expand Down

0 comments on commit 72d721a

Please sign in to comment.