]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/seastore: reset onode in 'SeaStore::repeat_with_onode' before the transact... 44345/head
authorXuehan Xu <xxhdx1985126@gmail.com>
Fri, 17 Dec 2021 05:20:35 +0000 (13:20 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Fri, 17 Dec 2021 06:06:09 +0000 (14:06 +0800)
commit2215c8155d405524ee29df0e75ff57b319d38c2b
treea96e4032050130a4b814a14aa5f9edc1ab907cde
parent0dd693cc2b06d9c7a30e7c642b23179d1e6861ce
crimson/os/seastore: reset onode in 'SeaStore::repeat_with_onode' before the transaction gets destroyed

Onodes hold references to the onode tree extents. And if it's referencing the root extent, that root
extent is cached in the onode trees root_tracker which caches onode tree roots by transaction address.
Than root_tracker entry only gets removed when the onode(or the corresponding "super") is destroyed.
On the other hand, two non-concurrent transactions can occupy the same address. So if an onode gets destroyed
after its transaction is destroyed, there will be a chance that another transaction occupying the same
address get that not-yet-destroyed and may-be-outdated onode.

BTW, Since we already cache extents in transactions, might want to drop onode tree root_tracker later?

Fixes: https://tracker.ceph.com/issues/53651
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/crimson/os/seastore/seastore.h