Merge pull request #57828 from xxhdx1985126/wip-seastore-btree-better-ut-asserts

crimson/os/seastore/btree: improve lba pointer related UT checks

Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
This commit is contained in:
Yingxin 2024-07-08 10:59:01 +08:00 committed by GitHub
commit 6e63060450
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -511,6 +511,8 @@ public:
&child_node);
} else {
if (i->get_val().pladdr.is_laddr()) {
assert(!node->children[i->get_offset()] ||
is_reserved_ptr(node->children[i->get_offset()]));
continue;
}
ret = c.trans.get_extent(
@ -586,7 +588,7 @@ public:
: true);
}
}
if (child == get_reserved_ptr()) {
if (is_reserved_ptr(child)) {
if constexpr(
!std::is_base_of_v<typename internal_node_t::base_t,
child_node_t>) {

View File

@ -130,7 +130,7 @@ struct FixedKVNode : ChildableCachedExtent {
children[offset] = child;
set_child_ptracker(child);
} else {
// this can only happen when reserving lba spaces
// this can happen when reserving lba spaces and cloning mappings
ceph_assert(is_leaf_and_has_children());
// this is to avoid mistakenly copying pointers from
// copy sources when committing this lba node, because