]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/onode-staged-tree: add asserts
authorYingxin Cheng <yingxin.cheng@intel.com>
Fri, 21 May 2021 06:41:33 +0000 (14:41 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Fri, 21 May 2021 06:47:56 +0000 (14:47 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/onode_manager/staged-fltree/node.h

index 4085dfa7297c2038f5f83bae77ae7d0c14363de7..5f5eae275c4e71eea304d799313651ecda88f781 100644 (file)
@@ -499,6 +499,7 @@ class InternalNode final : public Node {
     auto& child_pos = child.parent_info().position;
     auto found = tracked_child_nodes.find(child_pos);
     if (found != tracked_child_nodes.end() && found->second == &child) {
+      assert(child.parent_info().ptr == this);
       return true;
     } else {
       return false;
@@ -647,6 +648,7 @@ class LeafNode final : public Node {
     auto& cursor_pos = cursor.get_position();
     auto found = tracked_cursors.find(cursor_pos);
     if (found != tracked_cursors.end() && found->second == &cursor) {
+      assert(cursor.ref_leaf_node == this);
       return true;
     } else {
       return false;