Skip to content
Commit 99d8f83c authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: fix split_leaf double split corner case



split_leaf was not properly balancing leaves when it was forced to
split a leaf twice.  This commit adds an extra push left and right
before forcing the double split in hopes of getting the slot where
we want to insert at either the start or end of the leaf.

If the extra pushes do work, then we are able to avoid splitting twice
and we keep the tree properly balanced.

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 6f902af4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment