From: Joe Thornber Date: Wed, 28 Mar 2012 17:41:23 +0000 (+0100) Subject: dm persistent data: fix btree rebalancing after remove X-Git-Tag: v3.2.14~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9decde494c0960caaad20f6d5cd92d99a29dae2;p=pandora-kernel.git dm persistent data: fix btree rebalancing after remove commit b0988900bae9ecf968a8a8d086a9eec671a9517a upstream. When we remove an entry from a node we sometimes rebalance with it's two neighbours. This wasn't being done correctly; in some cases entries have to move all the way from the right neighbour to the left neighbour, or vice versa. This patch pretty much re-writes the balancing code to fix it. This code is barely used currently; only when you delete a thin device, and then only if you have hundreds of them in the same pool. Once we have discard support, which removes mappings, this will be used much more heavily. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer Signed-off-by: Alasdair G Kergon Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed