Skip to content

Commit 6e63060

Browse files
authored
Merge pull request ceph#57828 from xxhdx1985126/wip-seastore-btree-better-ut-asserts
crimson/os/seastore/btree: improve lba pointer related UT checks Reviewed-by: Yingxin Cheng <[email protected]>
2 parents 520c8df + 0de50ca commit 6e63060

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,8 @@ class FixedKVBtree {
511511
&child_node);
512512
} else {
513513
if (i->get_val().pladdr.is_laddr()) {
514+
assert(!node->children[i->get_offset()] ||
515+
is_reserved_ptr(node->children[i->get_offset()]));
514516
continue;
515517
}
516518
ret = c.trans.get_extent(
@@ -586,7 +588,7 @@ class FixedKVBtree {
586588
: true);
587589
}
588590
}
589-
if (child == get_reserved_ptr()) {
591+
if (is_reserved_ptr(child)) {
590592
if constexpr(
591593
!std::is_base_of_v<typename internal_node_t::base_t,
592594
child_node_t>) {

src/crimson/os/seastore/btree/fixed_kv_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ struct FixedKVNode : ChildableCachedExtent {
130130
children[offset] = child;
131131
set_child_ptracker(child);
132132
} else {
133-
// this can only happen when reserving lba spaces
133+
// this can happen when reserving lba spaces and cloning mappings
134134
ceph_assert(is_leaf_and_has_children());
135135
// this is to avoid mistakenly copying pointers from
136136
// copy sources when committing this lba node, because

0 commit comments

Comments
 (0)