]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/seastore/.../lba_btree: fix min_capacity condition 43641/head
authorSamuel Just <sjust@redhat.com>
Mon, 25 Oct 2021 07:47:16 +0000 (07:47 +0000)
committerSamuel Just <sjust@redhat.com>
Mon, 25 Oct 2021 19:59:36 +0000 (19:59 +0000)
commit617b87228f7f8b87dcaf406e39abe59691676b12
tree8981481ca70204ea021e9c037b3195e841ade4af
parent542d237ffef70b60f851320ac7432c331859d47e
crimson/os/seastore/.../lba_btree: fix min_capacity condition

Reducing the size of split_merge_multi has an interesting side effect of
causing removes to happen on some leaf nodes immediately after split.
After split, child nodes would have size 72 or 73.  At size 72, the node
would be at_min_size() and a remove would put it below causing the
at_min_size() condition to fail and hande_merge to misbehave.

Replace at_min_capacity() with below_min_capacity().
below_min_capacity() will not be true for any child of a split, and
asserts that the child is below capacity by no more than 1.

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