]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/os/seastore: add ExtentIndex::clear_and_dispose
authorXuehan Xu <xxhdx1985126@gmail.com>
Tue, 31 Aug 2021 03:26:31 +0000 (11:26 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Wed, 8 Sep 2021 03:03:01 +0000 (11:03 +0800)
commit75035edcb9ef50096afdb2dfc2c4e705644424a3
tree3a7c69b5e91125212e908bd5028613961449d536
parent9365da1ddd49965ce2ae7c2b9cc68d63f71377a2
crimson/os/seastore: add ExtentIndex::clear_and_dispose

When a transaction is interrupted and needs to repeat, its reset_preserve_handle() method
is called to clear various extent set and list. The problem is the clear operation call
ExtentIndex::clear() instead of ExtentIndex::erase(), which would leave CachedExtent::parent_index
still pointing to the write_set/delayed_set while the CachedExtent is no longer linked to
those sets. This would make CachedExtent::~CachedExtent() to try to erase itself from
CachedExtent::parent_index even it's not linked, which would cause failures in the successive
operations

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/crimson/os/seastore/cached_extent.cc
src/crimson/os/seastore/cached_extent.h
src/crimson/os/seastore/transaction.h