Skip to content

Commit 59d9e69

Browse files
committed
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 <[email protected]>
1 parent f965675 commit 59d9e69

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/crimson/os/seastore/transaction_manager.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,13 +1217,16 @@ class TransactionManager : public ExtentCallbackInterface {
12171217
// checking the lba child must be atomic with creating
12181218
// and linking the absent child
12191219
if (v.has_child()) {
1220-
return std::move(v.get_child_fut()
1221-
).si_then([type](auto ext) {
1222-
ceph_assert(ext->get_type() == type);
1223-
return ext;
1224-
});
1220+
auto extent = co_await std::move(v.get_child_fut());
1221+
auto len = extent->get_length();
1222+
auto ext = co_await cache->read_extent_maybe_partial(
1223+
t, std::move(extent), 0, len);
1224+
ceph_assert(ext->get_type() == type);
1225+
co_return ext;
12251226
} else {
1226-
return pin_to_extent_by_type(t, pin, v.get_child_pos(), type);
1227+
auto extent = co_await pin_to_extent_by_type(
1228+
t, pin, v.get_child_pos(), type);
1229+
co_return extent;
12271230
}
12281231
}
12291232

0 commit comments

Comments
 (0)