]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/seastore/lba: avoid paddr from crossing coroutines 69076/head
authorXuehan Xu <xuxuehan@qianxin.com>
Sun, 24 May 2026 08:45:01 +0000 (16:45 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Wed, 17 Jun 2026 07:45:49 +0000 (15:45 +0800)
commitaf137a0d86678fe868a5d8339d7c059eadef107a
tree9a3faab6251c394b6d8a075db5ff6bf591801a71
parent0419e34f8dcdd5cfacb72fee0f202996210d3548
crimson/os/seastore/lba: avoid paddr from crossing coroutines

Previously, LBAManager::remap_mappings() works as follows:

1. get the mapping's val;
2. remove the mapping;
3. insert the remapped mappings.

With pessimistic cc in place, during the above step 2 and 3, a rewrite
transaction that modifies the same mapping might be committed and miss
the pending lba leaf nodes because it doesn't contain the mapping at the
time.

This commit change the above workflow as follows:

1. replace the mapping with the first remapped mapping;
2. insert the remaining remapped mappings.

Note that all the remaining mapped mappings' paddrs are calculated based
on the mapping before it in the same coroutine as the insertion, which
means it'll always see the modification of a background rewrite
transaction.

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/btree/fixed_kv_btree.h
src/crimson/os/seastore/lba/btree_lba_manager.cc
src/crimson/os/seastore/lba/lba_btree_node.h
src/crimson/os/seastore/linked_tree_node.h