]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/lba: add more rigorous assertions
authorXuehan Xu <xuxuehan@qianxin.com>
Wed, 17 Jun 2026 11:21:06 +0000 (19:21 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Fri, 31 Jul 2026 01:40:19 +0000 (09:40 +0800)
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/lba/lba_btree_node.h
src/crimson/os/seastore/linked_tree_node.h

index f6dd325a8badff4d22b6ac4c48fc99b9ece43f1a..9f6e1ed296aeda41f104f4505cfe02f56fa40497 100644 (file)
@@ -357,7 +357,11 @@ struct LBALeafNode
           it++;
           continue;
         } else {
-          assert(child->_is_exist_clean() || child->_is_exist_mutation_pending());
+          assert(child->_is_exist_clean() ||
+                 child->_is_exist_mutation_pending() ||
+                 // a pending child might have been invalidated and
+                 // its corresponding mapping has not been removed
+                 !child->_is_valid());
         }
       }
       SUBTRACET(seastore_lba, "examing v2: {}~{}, v1: {}~{}",
index f6dc6f828db844fcd0f8830e57cb86854c028876..c9cf58902babae462edf1a7e6a56fd0ea62ab1b5 100644 (file)
@@ -215,9 +215,9 @@ public:
   virtual bool _is_mutable() const = 0;
   virtual bool _is_exist_clean() const = 0;
   virtual bool _is_exist_mutation_pending() const = 0;
+  virtual bool _is_valid() const = 0;
 protected:
   parent_tracker_ref<ParentT> parent_tracker;
-  virtual bool _is_valid() const = 0;
   virtual bool _is_stable() const = 0;
   template <typename, typename, typename>
   friend class ParentNode;