From 59d9e69b04e8fd2da17ef3fdb93a921c3c792b99 Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Sat, 6 Sep 2025 20:03:41 +0800 Subject: [PATCH] crimson/os/seastore/transaction_manager: read_pin_by_type read the whole extent if it's not fully loaded Fixes: https://tracker.ceph.com/issues/72902 Signed-off-by: Xuehan Xu --- src/crimson/os/seastore/transaction_manager.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/crimson/os/seastore/transaction_manager.h b/src/crimson/os/seastore/transaction_manager.h index 4f3eac69211..2ee2ee7dc66 100644 --- a/src/crimson/os/seastore/transaction_manager.h +++ b/src/crimson/os/seastore/transaction_manager.h @@ -1217,13 +1217,16 @@ 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() - ).si_then([type](auto ext) { - ceph_assert(ext->get_type() == type); - return ext; - }); + auto extent = co_await std::move(v.get_child_fut()); + auto len = extent->get_length(); + auto ext = co_await cache->read_extent_maybe_partial( + t, std::move(extent), 0, len); + ceph_assert(ext->get_type() == type); + co_return ext; } else { - return pin_to_extent_by_type(t, pin, v.get_child_pos(), type); + auto extent = co_await pin_to_extent_by_type( + t, pin, v.get_child_pos(), type); + co_return extent; } } -- 2.39.5