diff options
author | Joe Thornber <ejt@redhat.com> | 2013-12-20 15:41:11 +0000 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2014-01-09 16:29:17 -0500 |
commit | f164e6900f2be2c29f5c11ca52af5bb824f40826 (patch) | |
tree | f727095ad5fdbbc79c34796a1c7e79abc29456f5 /drivers/md/persistent-data/dm-btree.h | |
parent | 7e664b3dec431eebf0c5df5ff704d6197634cf35 (diff) | |
download | linux-f164e6900f2be2c29f5c11ca52af5bb824f40826.tar.bz2 |
dm btree: add dm_btree_find_lowest_key
dm_btree_find_lowest_key is the reciprocal of dm_btree_find_highest_key.
Factor out common code for dm_btree_find_{highest,lowest}_key.
dm_btree_find_lowest_key is needed for an upcoming DM target, as such it
is best to get this interface in place.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/persistent-data/dm-btree.h')
-rw-r--r-- | drivers/md/persistent-data/dm-btree.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/persistent-data/dm-btree.h b/drivers/md/persistent-data/dm-btree.h index 8672d159e0b5..dacfc34180b4 100644 --- a/drivers/md/persistent-data/dm-btree.h +++ b/drivers/md/persistent-data/dm-btree.h @@ -137,6 +137,14 @@ int dm_btree_remove(struct dm_btree_info *info, dm_block_t root, /* * Returns < 0 on failure. Otherwise the number of key entries that have * been filled out. Remember trees can have zero entries, and as such have + * no lowest key. + */ +int dm_btree_find_lowest_key(struct dm_btree_info *info, dm_block_t root, + uint64_t *result_keys); + +/* + * Returns < 0 on failure. Otherwise the number of key entries that have + * been filled out. Remember trees can have zero entries, and as such have * no highest key. */ int dm_btree_find_highest_key(struct dm_btree_info *info, dm_block_t root, |