]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/os/seastore: validate node immediately prior to adding pin
authorSamuel Just <sjust@redhat.com>
Thu, 14 Jan 2021 03:43:07 +0000 (03:43 +0000)
committerSamuel Just <sjust@redhat.com>
Mon, 1 Feb 2021 20:48:39 +0000 (12:48 -0800)
commite43e5eadc5da3e18f0e4eae80da9975c257b4206
tree5d3ddeb86466e4b7066d6a30ab723d69c61a34c2
parentd244530f92cf6ec2f85fa985a907eb2bcd8daf3d
crimson/os/seastore: validate node immediately prior to adding pin

Mostly, operating on an invalid extent is harmless by construction --
it'll be caught by the read set check in submit_transaction.  However,
prior to adding an extent to the lba pin set, we need to check that it's
really still live, which we can do by checking that it and its immediate
parent are still valid.  Mutating the target extent would have
invalidated it, and replacing the target extent would necessarily have
involved a mutation to the parent, which would have invalidated it.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/cached_extent.h
src/crimson/os/seastore/lba_manager/btree/btree_lba_manager.cc
src/crimson/os/seastore/lba_manager/btree/btree_range_pin.h
src/crimson/os/seastore/lba_manager/btree/lba_btree_node.h
src/crimson/os/seastore/lba_manager/btree/lba_btree_node_impl.cc
src/crimson/os/seastore/transaction_manager.cc
src/crimson/os/seastore/transaction_manager.h