From: Yingxin Cheng Date: Mon, 25 Nov 2024 07:11:11 +0000 (+0800) Subject: crimson/os/seastore/transaction_manager: verify type in read_pin_by_type X-Git-Tag: v20.0.0~617^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=19581dda9119094ebbe55806870e010fa2c62303;p=ceph.git crimson/os/seastore/transaction_manager: verify type in read_pin_by_type Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/os/seastore/transaction_manager.h b/src/crimson/os/seastore/transaction_manager.h index 5bd3c679dda2..0317d3b4bb88 100644 --- a/src/crimson/os/seastore/transaction_manager.h +++ b/src/crimson/os/seastore/transaction_manager.h @@ -993,7 +993,11 @@ private: // 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); }