This was causing a stray RETIRED_PLACEHOLDER to be created resulting in
a segment cleaner segfault in release on an invalid segment and a crash
upon adding a duplicate lba btree pin since the returned addr didn't
match the addr of the INITIAL_PENDING extent on the transaction.
Fixes: https://tracker.ceph.com/issues/52434
Fixes: https://tracker.ceph.com/issues/52435
Signed-off-by: Samuel Just <sjust@redhat.com>
}
lba_map_val_t get_val() const {
assert(!is_end());
- return leaf.node->iter_idx(leaf.pos).get_val();
+ auto ret = leaf.node->iter_idx(leaf.pos).get_val();
+ ret.paddr = ret.paddr.maybe_relative_to(leaf.node->get_paddr());
+ return ret;
}
bool is_end() const {
LBAPinRef get_pin() const {
assert(!is_end());
+ auto val = get_val();
+ auto key = get_key();
return std::make_unique<BtreeLBAPin>(
leaf.node,
- get_val().paddr.maybe_relative_to(leaf.node->get_paddr()),
- lba_node_meta_t{ get_key(), get_key() + get_val().len, 0 });
+ val.paddr,
+ lba_node_meta_t{ key, key + val.len, 0 });
}
private: