mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
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:
parent
2fca3c3538
commit
8ab6f707ce
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user