]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix split_leaf double split corner case
authorChris Mason <chris.mason@oracle.com>
Wed, 7 Jul 2010 14:51:48 +0000 (10:51 -0400)
committerChris Mason <chris.mason@oracle.com>
Mon, 19 Jul 2010 20:14:50 +0000 (16:14 -0400)
commit0bece402f2a77fd28d0aa68241945f1a1cc929c0
treedb4ea3e51c5cc33b903c498368dc7b14e2a07125
parent53c60d9b6cee6b32b334d76879d63c94565a4e4d
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: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.c