mirror of
https://github.com/ceph/ceph
synced 2025-01-10 13:10:46 +00:00
crimson/os/seastore/cache: workaround to drop delta with mismatched crc
The workaround is unreliable to identify whether the delta is out-dated, need to drop it once the paddr->journal_seq_t mapping is introduced. Note: this issue only happens with journal_type_t::CIRCULAR. Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
This commit is contained in:
parent
0d941855ff
commit
67a9109ca9
@ -840,6 +840,10 @@ public:
|
||||
return *ool_segment_seq_allocator;
|
||||
}
|
||||
|
||||
journal_type_t get_journal_type() const {
|
||||
return journal_type;
|
||||
}
|
||||
|
||||
void set_extent_callback(ExtentCallbackInterface *cb) {
|
||||
ecb = cb;
|
||||
}
|
||||
|
@ -1757,9 +1757,18 @@ Cache::replay_delta(
|
||||
DEBUG("replay extent delta at {} {} ... -- {}, prv_extent={}",
|
||||
journal_seq, record_base, delta, *extent);
|
||||
|
||||
assert(extent->version == delta.pversion);
|
||||
if (extent->last_committed_crc != delta.prev_crc) {
|
||||
// FIXME: we can't rely on crc to detect whether is delta is
|
||||
// out-of-date.
|
||||
ERROR("identified delta crc {} doesn't match the extent at {} {}, "
|
||||
"probably is out-dated -- {}",
|
||||
delta, journal_seq, record_base, *extent);
|
||||
ceph_assert(epm.get_journal_type() == journal_type_t::CIRCULAR);
|
||||
remove_extent(extent);
|
||||
return replay_delta_ertr::make_ready_future<bool>(false);
|
||||
}
|
||||
|
||||
assert(extent->last_committed_crc == delta.prev_crc);
|
||||
assert(extent->version == delta.pversion);
|
||||
extent->apply_delta_and_adjust_crc(record_base, delta.bl);
|
||||
extent->set_modify_time(modify_time);
|
||||
assert(extent->last_committed_crc == delta.final_crc);
|
||||
|
@ -98,6 +98,10 @@ public:
|
||||
cleaner->set_extent_callback(cb);
|
||||
}
|
||||
|
||||
journal_type_t get_journal_type() const {
|
||||
return cleaner->get_journal_type();
|
||||
}
|
||||
|
||||
seastore_off_t get_block_size() const {
|
||||
assert(primary_device != nullptr);
|
||||
// assume all the devices have the same block size
|
||||
|
Loading…
Reference in New Issue
Block a user