LOG_PREFIX(Cache::retire_extent_addr);
TRACET("retire {}~0x{:x}", t, paddr, length);
- assert(paddr.is_real() && !paddr.is_block_relative());
+ assert(paddr.is_real_location());
CachedExtentRef ext;
auto result = t.get_extent(paddr, &ext);
return get_device_id() == DEVICE_ID_ROOT;
}
- /**
- * is_real
- *
- * indicates whether addr reflects a physical location, absolute, relative,
- * or delayed. FAKE segments also count as real so as to reflect the way in
- * which unit tests use them.
- */
- bool is_real() const {
- return !is_zero() && !is_null() && !is_root();
- }
-
bool is_absolute() const {
return get_addr_type() != paddr_types_t::RESERVED;
}
return get_device_id() == DEVICE_ID_FAKE;
}
+ /**
+ * is_real_location
+ *
+ * indicates whether addr reflects a real location (valid in lba) --
+ * absolute, record-relative, or delayed.
+ */
+ bool is_real_location() const {
+ return is_absolute() || is_delayed() || is_record_relative();
+ }
+
auto operator<=>(const paddr_t &) const = default;
DENC(paddr_t, v, p) {
).si_then([this, FNAME, &t, offset, length,
maybe_init=std::move(maybe_init)] (auto pin) mutable
-> read_extent_ret<T> {
- if (length != pin->get_length() || !pin->get_val().is_real()) {
+ if (length != pin->get_length() || !pin->get_val().is_real_location()) {
SUBERRORT(seastore_tm, "{}~0x{:x} {} got wrong pin {}",
t, offset, length, T::TYPE, *pin);
ceph_abort("Impossible");
).si_then([this, FNAME, &t, offset,
maybe_init=std::move(maybe_init)] (auto pin) mutable
-> read_extent_ret<T> {
- if (!pin->get_val().is_real()) {
+ if (!pin->get_val().is_real_location()) {
SUBERRORT(seastore_tm, "{} {} got wrong pin {}",
t, offset, T::TYPE, *pin);
ceph_abort("Impossible");