Skip to content

Commit

Permalink
crimson/os/seastore/transaction_manager: verify type in read_pin_by_type
Browse files Browse the repository at this point in the history
Signed-off-by: Yingxin Cheng <[email protected]>
  • Loading branch information
cyx1231st committed Nov 28, 2024
1 parent 6187425 commit 19581dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/crimson/os/seastore/transaction_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,11 @@ class TransactionManager : public ExtentCallbackInterface {
// checking the lba child must be atomic with creating
// and linking the absent child
if (v.has_child()) {
return std::move(v.get_child_fut());
return std::move(v.get_child_fut()
).si_then([type](auto ext) {
ceph_assert(ext->get_type() == type);
return ext;
});
} else {
return pin_to_extent_by_type(t, std::move(pin), type);
}
Expand Down

0 comments on commit 19581dd

Please sign in to comment.