]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/os/seastore: set ExtentPlacementManager::allocated_to before rolling segments
authorXuehan Xu <xxhdx1985126@gmail.com>
Tue, 12 Oct 2021 01:55:21 +0000 (09:55 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Tue, 12 Oct 2021 04:43:22 +0000 (12:43 +0800)
commit460f6ca0478c8320247f96a8d308197a0d9c432e
tree1d46b4f567592a00600a72fed8d7a533a51e37b9
parentc7e262fa839000eefa2874704928adcdd81e3978
crimson/os/seastore: set ExtentPlacementManager::allocated_to before rolling segments

There are circumstances in which a transaction that are supposed to roll the current segment
is invalidated after it finished writing and before it rolls the segment. If we don't set
ExtentPlacementManager::allocated_to in this situation, another transaction can try to write
to the old "allocated_to" position, which would cause an invalid write error

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