dm btree remove: fix bug in redistribute3
authorDennis Yang <shinrairis@gmail.com>
Fri, 26 Jun 2015 14:25:48 +0000 (15:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:45 +0000 (09:29 -0700)
commitc3055bd86da041225bc2e156ec0574b090c36e43
tree2cfa99047cfbe29c70f89be36a1332f38599e121
parente70c51ae7f8f5e1389cb51cbadc4a1d60f10f7fd
dm btree remove: fix bug in redistribute3

commit 4c7e309340ff85072e96f529582d159002c36734 upstream.

redistribute3() shares entries out across 3 nodes.  Some entries were
being moved the wrong way, breaking the ordering.  This manifested as a
BUG() in dm-btree-remove.c:shift() when entries were removed from the
btree.

For additional context see:
https://www.redhat.com/archives/dm-devel/2015-May/msg00113.html

Signed-off-by: Dennis Yang <shinrairis@gmail.com>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/persistent-data/dm-btree-remove.c