]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/logical_child_node: LogicalChildNode should respond
authorXuehan Xu <xuxuehan@qianxin.com>
Tue, 22 Jul 2025 09:52:40 +0000 (17:52 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Wed, 23 Jul 2025 03:30:56 +0000 (11:30 +0800)
to the invalidation event

Although this is not causing any damage for now, it's violating the
invariant that invalid linked child nodes mustn't have parents.

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/logical_child_node.h
src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.h

index 0394a88bda84b389f52670e5c446717e21bddecd..3b2786f1eb223a72a551ca7f34ec97aed7ad4069 100644 (file)
@@ -20,6 +20,13 @@ public:
   template <typename... T>
   LogicalChildNode(T&&... t) : LogicalCachedExtent(std::forward<T>(t)...) {}
 
+  virtual void lcn_on_invalidated(Transaction &t) {}
+
+  void on_invalidated(Transaction &t) final {
+    this->lba_child_node_t::on_invalidated();
+    lcn_on_invalidated(t);
+  }
+
   virtual ~LogicalChildNode() {
     if (this->is_stable()) {
       lba_child_node_t::destroy();
index 414147d8e89d51f8cf0ede24120f58819b94616d..6fce9584f4684ff500877d7c2d35a6a42db4968e 100644 (file)
@@ -120,7 +120,7 @@ struct OMapInnerNode
     }
   }
 
-  void on_invalidated(Transaction &t) final {
+  void lcn_on_invalidated(Transaction &t) final {
     this->child_node_t::on_invalidated();
   }
 
@@ -329,7 +329,7 @@ struct OMapLeafNode
     }
   }
 
-  void on_invalidated(Transaction &t) final {
+  void lcn_on_invalidated(Transaction &t) final {
     this->child_node_t::on_invalidated();
   }