virtual extent_types_t get_type() const = 0;
virtual bool is_logical() const {
+ assert(!is_logical_type(get_type()));
+ assert(is_physical_type(get_type()));
return false;
}
ceph_assert(0 == "Should never happen for a placeholder");
}
- bool is_logical() const final {
- return false;
- }
-
void on_rewrite(Transaction &, CachedExtent&, extent_len_t) final {}
std::ostream &print_detail(std::ostream &out) const final {
}
bool is_logical() const final {
+ assert(is_logical_type(get_type()));
+ assert(!is_physical_type(get_type()));
return true;
}
partial_len,
[&pref]
(T &extent) mutable {
+ assert(extent.is_logical());
assert(!extent.has_laddr());
assert(!extent.has_been_invalidated());
assert(!pref.has_been_invalidated());
direct_key,
direct_length,
[&pref](CachedExtent &extent) mutable {
+ assert(extent.is_logical());
auto &lextent = static_cast<LogicalChildNode&>(extent);
assert(!lextent.has_laddr());
assert(!lextent.has_been_invalidated());