]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: introduce NONE to omap_type_t
authormyoungwon oh <ohmyoungwon@gmail.com>
Fri, 28 Feb 2025 10:43:03 +0000 (10:43 +0000)
committermyoungwon oh <ohmyoungwon@gmail.com>
Fri, 28 Feb 2025 10:43:03 +0000 (10:43 +0000)
Signed-off-by: Myoungwon Oh <ohmyoungwon@gmail.com>
src/crimson/os/seastore/omap_manager/btree/btree_omap_manager.h
src/crimson/os/seastore/seastore_types.h

index 03bd9a79914fabdab8a4422cf07c826e96ab59a8..90dbccf63eedf5fbc6f85bf31d607b91aa852fe4 100644 (file)
@@ -27,7 +27,7 @@ class BtreeOMapManager : public OMapManager {
 
   omap_context_t get_omap_context(
     Transaction &t, const omap_root_t &omap_root) {
-    ceph_assert(omap_root.type < omap_type_t::NUM_TYPES);
+    ceph_assert(omap_root.type < omap_type_t::NONE);
     return omap_context_t{tm, t, omap_root.hint, omap_root.type};
   }
 
index 15ca4e57118268a049854d0f18d44fd72f87021d..29bd7b9c85f12a87f0f82cb6ceb488e502bac9ac 100644 (file)
@@ -1793,7 +1793,7 @@ enum class omap_type_t : uint8_t {
   XATTR = 0,
   OMAP,
   LOG,
-  NUM_TYPES
+  NONE
 };
 std::ostream &operator<<(std::ostream &out, const omap_type_t &type);
 
@@ -1802,7 +1802,7 @@ struct omap_root_t {
   depth_t depth = 0;
   laddr_t hint = L_ADDR_MIN;
   bool mutated = false;
-  omap_type_t type = omap_type_t::NUM_TYPES;
+  omap_type_t type = omap_type_t::NONE;
 
   omap_root_t() = default;
   omap_root_t(laddr_t addr, depth_t depth, laddr_t addr_min, omap_type_t type)
@@ -1853,7 +1853,7 @@ std::ostream &operator<<(std::ostream &out, const omap_root_t &root);
 class __attribute__((packed)) omap_root_le_t {
   laddr_le_t addr = laddr_le_t(L_ADDR_NULL);
   depth_le_t depth = init_depth_le(0);
-  omap_type_t type = omap_type_t::NUM_TYPES;
+  omap_type_t type = omap_type_t::NONE;
 
 public: 
   omap_root_le_t() = default;