]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/seastore/lba_manager/btree: move duplicate_for_write
authorSamuel Just <sjust@redhat.com>
Tue, 16 Jun 2020 19:32:39 +0000 (12:32 -0700)
committerSamuel Just <sjust@redhat.com>
Fri, 19 Jun 2020 19:59:26 +0000 (12:59 -0700)
commit31bfa078ac8e92b52157d0908361ff871c96e6f1
treebb158b7e584fdb12111e83a702593aaef1016e3b
parent97222be2ef3192db371b18b0434395af487a4ffd
crimson/os/seastore/lba_manager/btree: move duplicate_for_write

Previously, it appears that I meant for the caller to insert to
invoke duplicate_for_write prior to calling insert().  I think
I chose that convention to avoid chained callbacks within a method
not on *this.  However, there are two scenarios where this is
necessary: leaf and split/merge.  The split/merge criteria are a
little involved and were only buggily considered.

This patch moves responsibilty for duplicate_for_write on *this
into insert/update.  Callers should assume that the callee will
handle it, and should not assume that they can call back into the
same node.

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