Skip to content

Commit 02acc0a

Browse files
committed
test/crimson/seastore/test_object_data_handler: remap pins through the
transaction that created the pins Fixes: https://tracker.ceph.com/issues/65610 Signed-off-by: Xuehan Xu <[email protected]>
1 parent eae1b31 commit 02acc0a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/test/crimson/seastore/test_object_data_handler.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,15 @@ struct object_data_handler_test_t:
213213
}
214214
}
215215
}
216+
std::list<LBAMappingRef> get_mappings(
217+
Transaction &t,
218+
objaddr_t offset,
219+
extent_len_t length) {
220+
auto ret = with_trans_intr(t, [&](auto &t) {
221+
return tm->get_pins(t, offset, length);
222+
}).unsafe_get0();
223+
return ret;
224+
}
216225
std::list<LBAMappingRef> get_mappings(objaddr_t offset, extent_len_t length) {
217226
auto t = create_mutate_transaction();
218227
auto ret = with_trans_intr(*t, [&](auto &t) {
@@ -758,7 +767,7 @@ TEST_P(object_data_handler_test_t, overwrite_then_read_within_transaction) {
758767

759768
t = create_mutate_transaction();
760769
{
761-
auto pins = get_mappings(base, len);
770+
auto pins = get_mappings(*t, base, len);
762771
assert(pins.size() == 1);
763772
auto pin1 = remap_pin(*t, std::move(pins.front()), 4096, 8192);
764773
auto ext = get_extent(*t, base + 4096, 4096 * 2);

0 commit comments

Comments
 (0)