Skip to content

Commit 1a06854

Browse files
committed
crimson/os/seastore: add retire alloc remarks for backref extents to skip replay invalid deltas
Fixes: https://tracker.ceph.com/issues/72580 Signed-off-by: Zhang Song <[email protected]>
1 parent 056bea4 commit 1a06854

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/crimson/os/seastore/cache.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,14 @@ record_t Cache::prepare_record(
14361436
extent->get_length(),
14371437
extent->get_type()));
14381438
} else if (is_backref_node(extent->get_type())) {
1439+
// The retire alloc deltas are used to identify the invalid backref extent
1440+
// deltas during replay when using CircularBoundedJournal, see
1441+
// build_paddr_seq_map in CBJournal::replay().
1442+
rel_delta.alloc_blk_ranges.emplace_back(
1443+
alloc_blk_t::create_retire(
1444+
extent->get_paddr(),
1445+
extent->get_length(),
1446+
extent->get_type()));
14391447
remove_backref_extent(extent->get_paddr());
14401448
} else {
14411449
ERRORT("Got unexpected extent type: {}", t, *extent);

src/crimson/os/seastore/seastore_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,6 +2107,7 @@ struct alloc_blk_t {
21072107
extent_len_t len,
21082108
extent_types_t type) {
21092109
assert(is_backref_mapped_type(type) ||
2110+
is_backref_node(type) ||
21102111
is_retired_placeholder_type(type));
21112112
return alloc_blk_t(paddr, L_ADDR_NULL, len, type);
21122113
}

0 commit comments

Comments
 (0)