Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa0cd28d authored by Joe Thornber's avatar Joe Thornber Committed by Mike Snitzer
Browse files

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: 4ec331c3 ("dm btree: add dm_btree_remove_leaves()")
Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent bd4aaf8f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;