]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/onode-staged-tree: remove unused logic in stages/node_stage_layout.h
authorYingxin Cheng <yingxin.cheng@intel.com>
Wed, 2 Dec 2020 14:51:51 +0000 (22:51 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Wed, 2 Dec 2020 14:51:51 +0000 (22:51 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/onode_manager/staged-fltree/stages/node_stage_layout.h

index f25a92b796fe1e1fed1b55cdedd092107420c61f..47de73c2055962164cc9496fc6772728dfa47c71 100644 (file)
@@ -144,26 +144,6 @@ struct _node_fields_013_t {
     return range.end - range.start;
   }
 
-#if 0
-  template <node_type_t NODE_TYPE>
-  void fill_unused(NodeExtentMutable& mut) const {
-    auto range = fields_free_range_before<NODE_TYPE>(*this, num_keys);
-    for (auto i = range.start; i < range.end; ++i) {
-      mut.copy_in_relative(i, uint8_t(0xc5));
-    }
-  }
-
-  template <node_type_t NODE_TYPE>
-  void validate_unused() const {
-    auto range = fields_free_range_before<NODE_TYPE>(*this, num_keys);
-    for (auto i = fields_start(*this) + range.start;
-         i < fields_start(*this) + range.end;
-         ++i) {
-      assert(*i == char(0xc5));
-    }
-  }
-#endif
-
   static node_offset_t estimate_insert_one() { return sizeof(SlotType); }
   template <KeyT KT>
   static void insert_at(
@@ -236,26 +216,6 @@ struct node_fields_2_t {
     return range.end - range.start;
   }
 
-#if 0
-  template <node_type_t NODE_TYPE>
-  void fill_unused(NodeExtentMutable& mut) const {
-    auto range = fields_free_range_before<NODE_TYPE>(*this, num_keys);
-    for (auto i = range.start; i < range.end; ++i) {
-      mut.copy_in_relative(i, uint8_t(0xc5));
-    }
-  }
-
-  template <node_type_t NODE_TYPE>
-  void validate_unused() const {
-    auto range = fields_free_range_before<NODE_TYPE>(*this, num_keys);
-    for (auto i = fields_start(*this) + range.start;
-         i < fields_start(*this) + range.end;
-         ++i) {
-      assert(*i == char(0xc5));
-    }
-  }
-#endif
-
   static node_offset_t estimate_insert_one() { return sizeof(node_offset_t); }
   template <KeyT KT>
   static void insert_at(
@@ -323,42 +283,6 @@ struct _internal_fields_3_t {
     return free;
   }
 
-#if 0
-  template <node_type_t NODE_TYPE>
-  void fill_unused(NodeExtentMutable& mut) const {
-    node_offset_t begin = (const char*)&keys[num_keys] - fields_start(*this);
-    node_offset_t end = (const char*)&child_addrs[0] - fields_start(*this);
-    for (auto i = begin; i < end; ++i) {
-      mut.copy_in_relative(i, uint8_t(0xc5));
-    }
-    begin = (const char*)&child_addrs[num_keys] - fields_start(*this);
-    end = NODE_BLOCK_SIZE;
-    if (is_level_tail()) {
-      begin += sizeof(laddr_t);
-    }
-    for (auto i = begin; i < end; ++i) {
-      mut.copy_in_relative(i, uint8_t(0xc5));
-    }
-  }
-
-  template <node_type_t NODE_TYPE>
-  void validate_unused() const {
-    auto begin = (const char*)&keys[num_keys];
-    auto end = (const char*)&child_addrs[0];
-    for (auto i = begin; i < end; ++i) {
-      assert(*i == uint8_t(0xc5));
-    }
-    begin = (const char*)&child_addrs[num_keys];
-    end = fields_start(*this) + NODE_BLOCK_SIZE;
-    if (is_level_tail()) {
-      begin += sizeof(laddr_t);
-    }
-    for (auto i = begin; i < end; ++i) {
-      assert(*i == char(0xc5));
-    }
-  }
-#endif
-
   static node_offset_t estimate_insert_one() {
     return sizeof(snap_gen_t) + sizeof(laddr_t);
   }