Skip to content

Commit e495e0e

Browse files
committed
crimson/os/seastore/transaction_manager:
Cache::retire_absent_extent_addr should be called immediately after TransactionManager::get_extent_if_linked if necessary Signed-off-by: Xuehan Xu <[email protected]>
1 parent bfb7bda commit e495e0e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/crimson/os/seastore/transaction_manager.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ class TransactionManager : public ExtentCallbackInterface {
528528
ceph_assert(!pin.is_clone());
529529
fut = fut.si_then([this, &t, &pin]() mutable {
530530
return lba_manager->refresh_lba_mapping(t, std::move(pin));
531-
}).si_then([this, &t, &pin](auto newpin) {
531+
}).si_then([this, &t, &pin, original_paddr, original_len](auto newpin) {
532532
pin = std::move(newpin);
533533
if (full_extent_integrity_check) {
534534
return read_pin<T>(t, pin.duplicate()
@@ -550,6 +550,7 @@ class TransactionManager : public ExtentCallbackInterface {
550550
});
551551
} else {
552552
// absent
553+
cache->retire_absent_extent_addr(t, original_paddr, original_len);
553554
return base_iertr::make_ready_future<TCachedExtentRef<T>>();
554555
}
555556
}
@@ -570,8 +571,6 @@ class TransactionManager : public ExtentCallbackInterface {
570571
if (ext) {
571572
assert(ext->is_seen_by_users());
572573
cache->retire_extent(t, ext);
573-
} else {
574-
cache->retire_absent_extent_addr(t, original_paddr, original_len);
575574
}
576575
for (auto &remap : remaps) {
577576
auto remap_offset = remap.offset;

0 commit comments

Comments
 (0)