const auto t_src = t.get_src();
remove_extent(ref, &t_src);
- ref->dirty_from_or_retired_at = JOURNAL_SEQ_NULL;
+ ref->dirty_from = JOURNAL_SEQ_NULL;
invalidate_extent(t, *ref);
}
if (i->prior_instance->version == 0 && i->version > 1) {
assert(can_inplace_rewrite(i->get_type()));
assert(can_inplace_rewrite(i->prior_instance->get_type()));
- assert(i->prior_instance->dirty_from_or_retired_at == JOURNAL_SEQ_MIN);
+ assert(i->prior_instance->dirty_from == JOURNAL_SEQ_MIN);
assert(i->prior_instance->state == CachedExtent::extent_state_t::CLEAN);
assert(i->prior_instance->get_paddr().is_absolute_random_block());
i->version = 1;
// set the version to zero because the extent state is now clean
// in order to handle this transparently
i->version = 0;
- i->dirty_from_or_retired_at = JOURNAL_SEQ_MIN;
+ i->dirty_from = JOURNAL_SEQ_MIN;
i->state = CachedExtent::extent_state_t::CLEAN;
assert(i->is_logical());
i->clear_modified_region();
i->state = CachedExtent::extent_state_t::DIRTY;
assert(i->version > 0);
if (i->version == 1 || is_root_type(i->get_type())) {
- i->dirty_from_or_retired_at = start_seq;
+ i->dirty_from = start_seq;
DEBUGT("commit extent done, become dirty -- {}", t, *i);
} else {
DEBUGT("commit extent done -- {}", t, *i);
}
last_commit = start_seq;
- for (auto &i: t.retired_set) {
- auto &extent = i.extent;
- extent->dirty_from_or_retired_at = start_seq;
- }
apply_backref_byseq(t.move_backref_entries(), start_seq);
commit_backref_entries(std::move(backref_entries), start_seq);
ceph_assert(delta.paddr.is_root());
remove_extent(root, nullptr);
root->apply_delta_and_adjust_crc(record_base, delta.bl);
- root->dirty_from_or_retired_at = journal_seq;
+ root->dirty_from = journal_seq;
root->state = CachedExtent::extent_state_t::DIRTY;
root->version = 1; // shouldn't be 0 as a dirty extent
DEBUG("replayed root delta at {} {}, add extent -- {}, root={}",
extent->version++;
if (extent->version == 1) {
- extent->dirty_from_or_retired_at = journal_seq;
+ extent->dirty_from = journal_seq;
DEBUG("replayed extent delta at {} {}, become dirty -- {}, extent={}" ,
journal_seq, record_base, delta, *extent);
} else {
<< ", trans=" << pending_for_transaction
<< ", pending_io=" << is_pending_io()
<< ", version=" << version
- << ", dirty_from_or_retired_at=" << dirty_from_or_retired_at
+ << ", dirty_from=" << dirty_from
<< ", modify_time=" << sea_time_point_printer_t{modify_time}
<< ", paddr=" << get_paddr()
<< ", prior_paddr=" << prior_poffset_str
/// Return journal location of oldest relevant delta, only valid while DIRTY
auto get_dirty_from() const {
ceph_assert(has_delta());
- return dirty_from_or_retired_at;
- }
-
- /// Return journal location of oldest relevant delta, only valid while RETIRED
- auto get_retired_at() const {
- ceph_assert(!is_valid());
- return dirty_from_or_retired_at;
+ return dirty_from;
}
/// Return true if extent is fully loaded or is about to be fully loaded (call
primary_ref_list_member_options>;
/**
- * dirty_from_or_retired_at
+ * dirty_from
*
- * Encodes ordering token for primary_ref_list -- dirty_from when
- * dirty or retired_at if retired.
+ * Encodes ordering token for primary_ref_list -- dirty_from when dirty
*/
- journal_seq_t dirty_from_or_retired_at;
+ journal_seq_t dirty_from;
/// cache data contents, std::nullopt iff partially loaded
std::optional<ceph::bufferptr> ptr;
/// construct new CachedExtent, will deep copy the buffer
CachedExtent(const CachedExtent &other)
: state(other.state),
- dirty_from_or_retired_at(other.dirty_from_or_retired_at),
+ dirty_from(other.dirty_from),
length(other.get_length()),
loaded_length(other.get_loaded_length()),
version(other.version),
/// construct new CachedExtent, will shallow copy the buffer
CachedExtent(const CachedExtent &other, share_buffer_t)
: state(other.state),
- dirty_from_or_retired_at(other.dirty_from_or_retired_at),
+ dirty_from(other.dirty_from),
ptr(other.ptr),
length(other.get_length()),
loaded_length(other.get_loaded_length()),