crimson/os/seastore: rework pending extents
authorSamuel Just <sjust@redhat.com>
Thu, 23 Jul 2020 00:23:53 +0000 (17:23 -0700)
committerSamuel Just <sjust@redhat.com>
Wed, 23 Sep 2020 22:13:51 +0000 (15:13 -0700)
commit001bed8659d5820c4f260ab6c2f21d8282e8574a
tree4aeaf92eba127a4b57d42ef4cc97fb83680fef01
parent053f4017d1b317169aa81af05b6ee40ad9491b93
crimson/os/seastore: rework pending extents

Previously, we simply added the old extent to the retired set and
treated the new instance seperately.  Instead, let the new pending
instance reference the old instance via a prior_instance reference.
This has a few advantages:
- During commit, we swap cache hooks from the prior instance to
  avoid traversal
- Extents in the retired set are only those extents that are no
  longer mapped/valid.
- btree range pins can be swapped without a traversal
- position in the dirty list can be maintained

That last will be particularly important as the dirty list will
therefore be ordered from the extent with the oldest initial
delta forward.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/cache.cc
src/crimson/os/seastore/cache.h
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.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/transaction.h