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

Commit 17e9a916 authored by Vinothkumar Raja's avatar Vinothkumar Raja Committed by Greg Kroah-Hartman
Browse files

dm btree: fix for dm_btree_find_lowest_key()



commit 7d1fedb6e96a960aa91e4ff70714c3fb09195a5a upstream.

dm_btree_find_lowest_key() is giving incorrect results.  find_key()
traverses the btree correctly for finding the highest key, but there is
an error in the way it traverses the btree for retrieving the lowest
key.  dm_btree_find_lowest_key() fetches the first key of the rightmost
block of the btree instead of fetching the first key from the leftmost
block.

Fix this by conditionally passing the correct parameter to value64()
based on the @find_highest flag.

Signed-off-by: default avatarErez Zadok <ezk@fsl.cs.sunysb.edu>
Signed-off-by: default avatarVinothkumar Raja <vinraja@cs.stonybrook.edu>
Signed-off-by: default avatarNidhi Panpalia <npanpalia@cs.stonybrook.edu>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2c128b70
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment