summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2015-08-07 18:33:01 +0300
committerMike Snitzer <snitzer@redhat.com>2015-08-07 18:56:43 +0300
commitaa0cd28d057fd4cb686fbdd2475a6a3f609dd581 (patch)
treebaaf9c352522d846c240d9c3bad4606fac9d27e3 /drivers
parentbd4aaf8f9b85d6b2df3231fd62b219ebb75d3568 (diff)
downloadlinux-aa0cd28d057fd4cb686fbdd2475a6a3f609dd581.tar.xz
dm btree remove: fix bug in remove_one()
remove_one() was not incrementing the key for the beginning of the range, so not all entries were being removed. This resulted in discards that were not unmapping all blocks. Fixes: 4ec331c3ea ("dm btree: add dm_btree_remove_leaves()") Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/persistent-data/dm-btree-remove.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/persistent-data/dm-btree-remove.c b/drivers/md/persistent-data/dm-btree-remove.c
index 9836c0ae897c..9ca9eccd512f 100644
--- a/drivers/md/persistent-data/dm-btree-remove.c
+++ b/drivers/md/persistent-data/dm-btree-remove.c
@@ -689,6 +689,7 @@ static int remove_one(struct dm_btree_info *info, dm_block_t root,
value_ptr(n, index));
delete_at(n, index);
+ keys[last_level] = k + 1ull;
} else
r = -ENODATA;