]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/seastore: change unit test using hint 42731/head
authorChunmei Liu <chunmei.liu@intel.com>
Wed, 11 Aug 2021 03:22:17 +0000 (20:22 -0700)
committerChunmei Liu <chunmei.liu@intel.com>
Mon, 16 Aug 2021 20:56:08 +0000 (13:56 -0700)
Signed-off-by: Chunmei Liu <chunmei.liu@intel.com>
src/test/crimson/seastore/onode_tree/test_fltree_onode_manager.cc
src/test/crimson/seastore/onode_tree/test_staged_fltree.cc
src/test/crimson/seastore/test_object_data_handler.cc
src/test/crimson/seastore/test_omap_manager.cc

index 80122d9eb427595c8741d1c863736bb10f1c9b3c..846b6fc9c71ec2b2b267acbacb1cbc67ae7cb604 100644 (file)
@@ -31,15 +31,15 @@ struct onode_item_t {
   void initialize(Transaction& t, Onode& value) const {
     auto& layout = value.get_mutable_layout(t);
     layout.size = size;
-    layout.omap_root.update(omap_root_t(id, cnt_modify));
+    layout.omap_root.update(omap_root_t(id, cnt_modify, value.get_hint()));
     validate(value);
   }
 
   void validate(Onode& value) const {
     auto& layout = value.get_layout();
     ceph_assert(laddr_t(layout.size) == laddr_t{size});
-    ceph_assert(layout.omap_root.get().addr == id);
-    ceph_assert(layout.omap_root.get().depth == cnt_modify);
+    ceph_assert(layout.omap_root.get(value.get_hint()).addr == id);
+    ceph_assert(layout.omap_root.get(value.get_hint()).depth == cnt_modify);
   }
 
   void modify(Transaction& t, Onode& value) {
index 24e314fb1d1711d5a60bbaf393761f87d0b2ea12..771e5b0356904302dda902f21dabe209526f041c 100644 (file)
@@ -42,7 +42,7 @@ using namespace crimson::os::seastore::onode;
   with_trans_intr(                      \
     c.t,                                \
     [=] (auto &t) {                     \
-      return fun(c, b, v);              \
+      return fun(c, L_ADDR_MIN, b, v);  \
     }                                   \
   )
 
@@ -908,7 +908,7 @@ class DummyChildPool {
       ceph_abort("impossible path"); }
     search_position_t merge(NodeExtentMutable&, NodeImpl&, match_stage_t, extent_len_t) override {
       ceph_abort("impossible path"); }
-    eagain_ifuture<NodeExtentMutable> rebuild_extent(context_t) override {
+    eagain_ifuture<NodeExtentMutable> rebuild_extent(context_t, laddr_t) override {
       ceph_abort("impossible path"); }
     node_stats_t get_stats() const override {
       ceph_abort("impossible path"); }
@@ -1062,7 +1062,7 @@ class DummyChildPool {
         crimson::ct_error::assert_all{"Invalid error during create_initial()"}
       ).si_then([c, initial](auto super) {
         initial->make_root_new(c, std::move(super));
-        return initial->upgrade_root(c).si_then([initial] {
+        return initial->upgrade_root(c, L_ADDR_MIN).si_then([initial] {
           return initial;
         });
       });
index f30cd7a9ff2a3db093a09ff01f187be02719b029..e2fac7f68f1a0ce2b3cd95923d69738d3bcb68f9 100644 (file)
@@ -30,6 +30,7 @@ public:
     return layout;
   }
   bool is_dirty() const { return dirty; }
+  laddr_t get_hint() const final {return L_ADDR_MIN; }
   ~TestOnode() final = default;
 };
 
index e267b44e76f33a79ba6d510054134f1acfe5b966..233d8ac5fd190fca2324550421a44778d5df0864 100644 (file)
@@ -219,7 +219,7 @@ struct omap_manager_test_t :
     omap_root_t omap_root = with_trans_intr(
       *t,
       [this](auto &t) {
-       return omap_manager->initialize_omap(t);
+       return omap_manager->initialize_omap(t, L_ADDR_MIN);
       }).unsafe_get0();
     submit_transaction(std::move(t));
     return omap_root;