LBAManager rely on lba nodes' logical start addresses to judge whether an lba extent
is still live
Fixes: https://tracker.ceph.com/issues/53612
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
i->get_type(),
i->is_logical()
? i->cast<LogicalCachedExtent>()->get_laddr()
- : L_ADDR_NULL,
+ : (is_lba_node(i->get_type())
+ ? i->cast<lba_manager::btree::LBANode>()->get_node_meta().begin
+ : L_ADDR_NULL),
std::move(bl)
});
}
});
}
-static bool is_lba_node(extent_types_t type)
-{
- return type == extent_types_t::LADDR_INTERNAL ||
- type == extent_types_t::LADDR_LEAF;
-}
-
static bool is_lba_node(const CachedExtent &e)
{
return is_lba_node(e.get_type());
}
}
+constexpr bool is_lba_node(extent_types_t type)
+{
+ return type == extent_types_t::LADDR_INTERNAL ||
+ type == extent_types_t::LADDR_LEAF;
+}
+
std::ostream &operator<<(std::ostream &out, extent_types_t t);
/* description of a new physical extent */