Skip to content

Commit 6fdff2e

Browse files
authored
Merge pull request ceph#65424 from xxhdx1985126/wip-72902
crimson/os/seastore/transaction_manager: read_pin_by_type read the whole extent if it's not fully loaded Reviewed-by: Matan Breizman <[email protected]>
2 parents 2d0108a + 59d9e69 commit 6fdff2e

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
@@ -1208,13 +1208,16 @@ class TransactionManager : public ExtentCallbackInterface {
12081208
// checking the lba child must be atomic with creating
12091209
// and linking the absent child
12101210
if (v.has_child()) {
1211-
return std::move(v.get_child_fut()
1212-
).si_then([type](auto ext) {
1213-
ceph_assert(ext->get_type() == type);
1214-
return ext;
1215-
});
1211+
auto extent = co_await std::move(v.get_child_fut());
1212+
auto len = extent->get_length();
1213+
auto ext = co_await cache->read_extent_maybe_partial(
1214+
t, std::move(extent), 0, len);
1215+
ceph_assert(ext->get_type() == type);
1216+
co_return ext;
12161217
} else {
1217-
return pin_to_extent_by_type(t, pin, v.get_child_pos(), type);
1218+
auto extent = co_await pin_to_extent_by_type(
1219+
t, pin, v.get_child_pos(), type);
1220+
co_return extent;
12181221
}
12191222
}
12201223

0 commit comments

Comments
 (0)