Lines Matching refs:where
195 const void *value, zfs_btree_index_t *where) in zfs_btree_find_in_buf() argument
208 where->bti_offset = idx; in zfs_btree_find_in_buf()
209 where->bti_before = B_FALSE; in zfs_btree_find_in_buf()
214 where->bti_offset = max; in zfs_btree_find_in_buf()
215 where->bti_before = B_TRUE; in zfs_btree_find_in_buf()
224 zfs_btree_find(zfs_btree_t *tree, const void *value, zfs_btree_index_t *where) in zfs_btree_find() argument
227 if (where != NULL) { in zfs_btree_find()
228 where->bti_node = NULL; in zfs_btree_find()
229 where->bti_offset = 0; in zfs_btree_find()
253 if (where != NULL) { in zfs_btree_find()
254 where->bti_node = (zfs_btree_hdr_t *)last_leaf; in zfs_btree_find()
255 where->bti_offset = in zfs_btree_find()
257 where->bti_before = B_TRUE; in zfs_btree_find()
261 if (where != NULL) { in zfs_btree_find()
262 where->bti_node = (zfs_btree_hdr_t *)last_leaf; in zfs_btree_find()
263 where->bti_offset = in zfs_btree_find()
265 where->bti_before = B_FALSE; in zfs_btree_find()
283 if (where != NULL) { in zfs_btree_find()
285 *where = idx; in zfs_btree_find()
306 if (where != NULL) { in zfs_btree_find()
308 *where = idx; in zfs_btree_find()
326 if (where != NULL) { in zfs_btree_find()
328 *where = idx; in zfs_btree_find()
558 zfs_btree_index_t *where) in zfs_btree_first_helper() argument
568 if (where != NULL) { in zfs_btree_first_helper()
569 where->bti_node = node; in zfs_btree_first_helper()
570 where->bti_offset = 0; in zfs_btree_first_helper()
571 where->bti_before = B_FALSE; in zfs_btree_first_helper()
1056 const zfs_btree_index_t *where) in zfs_btree_add_idx() argument
1062 if (where->bti_node != &tree->bt_bulk->btl_hdr) { in zfs_btree_add_idx()
1065 where = &idx; in zfs_btree_add_idx()
1074 if (where->bti_node == NULL) { in zfs_btree_add_idx()
1078 ASSERT0(where->bti_offset); in zfs_btree_add_idx()
1094 } else if (!zfs_btree_is_core(where->bti_node)) { in zfs_btree_add_idx()
1100 (zfs_btree_leaf_t *)where->bti_node, value, in zfs_btree_add_idx()
1101 where->bti_offset); in zfs_btree_add_idx()
1110 zfs_btree_core_t *node = (zfs_btree_core_t *)where->bti_node; in zfs_btree_add_idx()
1116 uint32_t off = where->bti_offset; in zfs_btree_add_idx()
1144 zfs_btree_first(zfs_btree_t *tree, zfs_btree_index_t *where) in zfs_btree_first() argument
1150 return (zfs_btree_first_helper(tree, tree->bt_root, where)); in zfs_btree_first()
1159 zfs_btree_index_t *where) in zfs_btree_last_helper() argument
1168 if (where != NULL) { in zfs_btree_last_helper()
1169 where->bti_node = node; in zfs_btree_last_helper()
1170 where->bti_offset = node->bth_count - 1; in zfs_btree_last_helper()
1171 where->bti_before = B_FALSE; in zfs_btree_last_helper()
1182 zfs_btree_last(zfs_btree_t *tree, zfs_btree_index_t *where) in zfs_btree_last() argument
1188 return (zfs_btree_last_helper(tree, tree->bt_root, where)); in zfs_btree_last()
1370 zfs_btree_index_t where = {0}; in zfs_btree_add() local
1371 VERIFY3P(zfs_btree_find(tree, node, &where), ==, NULL); in zfs_btree_add()
1372 zfs_btree_add_idx(tree, node, &where); in zfs_btree_add()
1617 zfs_btree_remove_idx(zfs_btree_t *tree, zfs_btree_index_t *where) in zfs_btree_remove_idx() argument
1620 zfs_btree_hdr_t *hdr = where->bti_node; in zfs_btree_remove_idx()
1621 uint32_t idx = where->bti_offset; in zfs_btree_remove_idx()
1623 ASSERT(!where->bti_before); in zfs_btree_remove_idx()
1631 uint8_t *value = zfs_btree_get(tree, where); in zfs_btree_remove_idx()
1635 VERIFY3P(zfs_btree_find(tree, tmp, where), !=, NULL); in zfs_btree_remove_idx()
1637 hdr = where->bti_node; in zfs_btree_remove_idx()
1638 idx = where->bti_offset; in zfs_btree_remove_idx()
1652 where); in zfs_btree_remove_idx()
1657 hdr = where->bti_node; in zfs_btree_remove_idx()
1658 idx = where->bti_offset; in zfs_btree_remove_idx()
1659 ASSERT(!where->bti_before); in zfs_btree_remove_idx()
1831 zfs_btree_index_t where = {0}; in zfs_btree_remove() local
1832 VERIFY3P(zfs_btree_find(tree, value, &where), !=, NULL); in zfs_btree_remove()
1833 zfs_btree_remove_idx(tree, &where); in zfs_btree_remove()