aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/btree.c
diff options
context:
space:
mode:
authorPaul Dagnelie <[email protected]>2019-10-11 10:13:21 -0700
committerBrian Behlendorf <[email protected]>2019-10-11 10:13:21 -0700
commit516a83f8861269de9f795a96c471623e3bd67009 (patch)
treed9ba260ae1f1f196a1ee4eb2b0a3c8fdbc392695 /module/zfs/btree.c
parentbce795ad7a1385fe81052bab6a85ae17b90986b7 (diff)
Function name and comment updates
Rename certain functions for more consistency when they share common features. Make comments clearer about what arguments should be passed to the insert and add functions. Reviewed by: Sara Hartse <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matt Ahrens <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #9441
Diffstat (limited to 'module/zfs/btree.c')
-rw-r--r--module/zfs/btree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/btree.c b/module/zfs/btree.c
index 8f514caab..f099eb67c 100644
--- a/module/zfs/btree.c
+++ b/module/zfs/btree.c
@@ -980,7 +980,7 @@ zfs_btree_bulk_finish(zfs_btree_t *tree)
* Insert value into tree at the location specified by where.
*/
void
-zfs_btree_insert(zfs_btree_t *tree, const void *value,
+zfs_btree_add_idx(zfs_btree_t *tree, const void *value,
const zfs_btree_index_t *where)
{
zfs_btree_index_t idx = {0};
@@ -1294,7 +1294,7 @@ zfs_btree_add(zfs_btree_t *tree, const void *node)
{
zfs_btree_index_t where = {0};
VERIFY3P(zfs_btree_find(tree, node, &where), ==, NULL);
- zfs_btree_insert(tree, node, &where);
+ zfs_btree_add_idx(tree, node, &where);
}
/* Helper function to free a tree node. */
@@ -1542,7 +1542,7 @@ zfs_btree_remove_from_node(zfs_btree_t *tree, zfs_btree_core_t *node,
/* Remove the element at the specific location. */
void
-zfs_btree_remove_from(zfs_btree_t *tree, zfs_btree_index_t *where)
+zfs_btree_remove_idx(zfs_btree_t *tree, zfs_btree_index_t *where)
{
size_t size = tree->bt_elem_size;
zfs_btree_hdr_t *hdr = where->bti_node;
@@ -1778,7 +1778,7 @@ zfs_btree_remove(zfs_btree_t *tree, const void *value)
{
zfs_btree_index_t where = {0};
VERIFY3P(zfs_btree_find(tree, value, &where), !=, NULL);
- zfs_btree_remove_from(tree, &where);
+ zfs_btree_remove_idx(tree, &where);
}
/* Return the number of elements in the tree. */