Lines Matching refs:keys
47 uint64_t mid_key = le64_to_cpu(n->keys[mid]); in bsearch()
101 array_insert(node->keys, sizeof(*node->keys), nr_entries, index, &key_le); in insert_at()
364 *result_key = le64_to_cpu(ro_node(s)->keys[i]); in btree_lookup_raw()
372 uint64_t *keys, void *value_le) in dm_btree_lookup() argument
394 r = btree_lookup_raw(&spine, root, keys[level], in dm_btree_lookup()
399 if (rkey != keys[level]) { in dm_btree_lookup()
459 *rkey = le64_to_cpu(n->keys[i]); in dm_btree_lookup_next_single()
468 uint64_t *keys, uint64_t *rkey, void *value_le) in dm_btree_lookup_next() argument
477 r = btree_lookup_raw(&spine, root, keys[level], in dm_btree_lookup_next()
483 if (*rkey != keys[level]) { in dm_btree_lookup_next()
491 r = dm_btree_lookup_next_single(info, root, keys[level], rkey, value_le); in dm_btree_lookup_next()
510 memcpy(dest->keys + dest_offset, src->keys + src_offset, count * sizeof(uint64_t)); in copy_entries()
523 memmove(dest->keys + dest_offset, src->keys + src_offset, count * sizeof(uint64_t)); in move_entries()
675 le64_to_cpu(rn->keys[0]), &location); in split_one_into_two()
682 if (key < le64_to_cpu(rn->keys[0])) { in split_one_into_two()
770 pn->keys[middle_index] = rn->keys[0]; in split_two_into_three()
774 le64_to_cpu(mn->keys[0]), &location); in split_two_into_three()
789 if (key < le64_to_cpu(mn->keys[0])) { in split_two_into_three()
793 } else if (key < le64_to_cpu(rn->keys[0])) { in split_two_into_three()
856 memcpy(ln->keys, pn->keys, nr_left * sizeof(pn->keys[0])); in btree_split_beneath()
873 memcpy(rn->keys, pn->keys + nr_left, nr_right * sizeof(pn->keys[0])); in btree_split_beneath()
888 pn->keys[0] = ln->keys[0]; in btree_split_beneath()
893 pn->keys[1] = rn->keys[0]; in btree_split_beneath()
920 *key_ptr(parent, parent_index) = right->keys[0]; in rebalance_left()
922 if (key < le64_to_cpu(right->keys[0])) { in rebalance_left()
949 *key_ptr(parent, parent_index + 1) = right->keys[0]; in rebalance_right()
951 if (key < le64_to_cpu(right->keys[0])) { in rebalance_right()
1056 if (i >= 0 && le64_to_cpu(node->keys[i]) == key) in contains_key()
1130 node->keys[0] = cpu_to_le64(key); in btree_insert_raw()
1138 if (i < 0 || le64_to_cpu(node->keys[i]) != key) in btree_insert_raw()
1179 if (key != le64_to_cpu(node->keys[i])) in __btree_get_overwrite_leaf()
1216 static bool need_insert(struct btree_node *node, uint64_t *keys, in need_insert() argument
1220 (le64_to_cpu(node->keys[index]) != keys[level])); in need_insert()
1224 uint64_t *keys, void *value, dm_block_t *new_root, in insert() argument
1239 r = btree_insert_raw(&spine, block, &le64_type, keys[level], &index); in insert()
1245 if (need_insert(n, keys, level, index)) { in insert()
1257 keys[level], &new_le); in insert()
1267 keys[level], &index); in insert()
1273 if (need_insert(n, keys, level, index)) { in insert()
1278 keys[level], value); in insert()
1311 uint64_t *keys, void *value, dm_block_t *new_root) in dm_btree_insert() argument
1314 return insert(info, root, keys, value, new_root, NULL); in dm_btree_insert()
1319 uint64_t *keys, void *value, dm_block_t *new_root, in dm_btree_insert_notify() argument
1323 return insert(info, root, keys, value, new_root, inserted); in dm_btree_insert_notify()
1348 *result_key = le64_to_cpu(ro_node(s)->keys[i]); in find_key()
1350 *result_key = le64_to_cpu(ro_node(s)->keys[0]); in find_key()
1411 int (*fn)(void *context, uint64_t *keys, void *leaf), in walk_node() argument
1418 uint64_t keys; in walk_node() local
1433 keys = le64_to_cpu(*key_ptr(n, i)); in walk_node()
1434 r = fn(context, &keys, value_ptr(n, i)); in walk_node()
1446 int (*fn)(void *context, uint64_t *keys, void *leaf), in dm_btree_walk() argument