crimson/os/seastore/transaction_manager: refresh the indirect_cursor

after removing the direct_cursor in _remove()

Fixes: https://tracker.ceph.com/issues/77485
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
This commit is contained in:
Xuehan Xu 2026-06-18 13:18:47 +08:00
parent 2fca3c3538
commit 8ab6f707ce

View File

@ -331,6 +331,12 @@ TransactionManager::_remove(
indirect_cursor = co_await lba_manager->update_mapping_refcount(
t, mapping.indirect_cursor, -1);
co_await mapping.direct_cursor->refresh();
if (unlikely(indirect_cursor->get_key() ==
mapping.direct_cursor->get_key())) {
// indirect_cursor points to the same mapping as direct_cursor,
// no need to keep it
indirect_cursor.reset();
}
}
DEBUGT("removing direct mapping {}~0x{:x} refcount={} -- offset={}",
@ -345,6 +351,10 @@ TransactionManager::_remove(
LBACursorRef direct_cursor = co_await lba_manager->update_mapping_refcount(
t, mapping.direct_cursor, -1);
if (indirect_cursor) {
co_await indirect_cursor->refresh();
}
auto ret = co_await resolve_cursor_to_mapping(
t,
indirect_cursor ? std::move(indirect_cursor) : std::move(direct_cursor)