Skip to content

Commit 271cf4f

Browse files
committed
crimson/.../lba_btree_node: add assertion for pivot_idx validity
Signed-off-by: Chanyoung Park <[email protected]>
1 parent 88a7233 commit 271cf4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/crimson/os/seastore/lba/lba_btree_node.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ struct LBALeafNode
259259
uint32_t pivot_idx,
260260
LBALeafNode &replacement_left,
261261
LBALeafNode &replacement_right) final {
262+
// We should do full merge if pivot_idx == right.get_size().
263+
ceph_assert(pivot_idx != right.get_size());
262264
this->balance_child_ptrs(
263265
t, left, right, pivot_idx, replacement_left, replacement_right);
264266
}

0 commit comments

Comments
 (0)