dm btree remove: fix bug in redistribute3
authorDennis Yang <shinrairis@gmail.com>
Fri, 26 Jun 2015 14:25:48 +0000 (15:25 +0100)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:09:19 +0000 (13:09 +0000)
commit92f95f36d41635283841593a8a967b1478c6fd03
tree2cb8123aad479207851a7b76dfe285ca5623d554
parente8fc11be58a65bd3dd2c5e46ed73e0b486a03f90
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