Lines Matching refs:shortcut
25 const struct assoc_array_shortcut *shortcut; in assoc_array_subtree_iterate() local
36 shortcut = assoc_array_ptr_to_shortcut(cursor); in assoc_array_subtree_iterate()
37 cursor = READ_ONCE(shortcut->next_node); /* Address dependency. */ in assoc_array_subtree_iterate()
96 shortcut = assoc_array_ptr_to_shortcut(parent); in assoc_array_subtree_iterate()
98 parent = READ_ONCE(shortcut->back_pointer); /* Address dependency. */ in assoc_array_subtree_iterate()
99 slot = shortcut->parent_slot; in assoc_array_subtree_iterate()
158 struct assoc_array_shortcut *shortcut; member
175 struct assoc_array_shortcut *shortcut; in assoc_array_walk() local
242 shortcut = assoc_array_ptr_to_shortcut(cursor); in assoc_array_walk()
243 pr_devel("shortcut to %d\n", shortcut->skip_to_level); in assoc_array_walk()
245 BUG_ON(sc_level > shortcut->skip_to_level); in assoc_array_walk()
255 sc_segments = shortcut->index_key[sc_level >> ASSOC_ARRAY_KEY_CHUNK_SHIFT]; in assoc_array_walk()
258 if (round_up(sc_level, ASSOC_ARRAY_KEY_CHUNK_SIZE) > shortcut->skip_to_level) { in assoc_array_walk()
260 int shift = shortcut->skip_to_level & ASSOC_ARRAY_KEY_CHUNK_MASK; in assoc_array_walk()
262 next_sc_level = shortcut->skip_to_level; in assoc_array_walk()
270 result->wrong_shortcut.shortcut = shortcut; in assoc_array_walk()
279 } while (sc_level < shortcut->skip_to_level); in assoc_array_walk()
282 cursor = READ_ONCE(shortcut->next_node); /* Address dependency. */ in assoc_array_walk()
346 struct assoc_array_shortcut *shortcut; in assoc_array_destroy_subtree() local
364 shortcut = assoc_array_ptr_to_shortcut(cursor); in assoc_array_destroy_subtree()
365 BUG_ON(shortcut->back_pointer != parent); in assoc_array_destroy_subtree()
366 BUG_ON(slot != -1 && shortcut->parent_slot != slot); in assoc_array_destroy_subtree()
368 cursor = shortcut->next_node; in assoc_array_destroy_subtree()
407 shortcut = assoc_array_ptr_to_shortcut(parent); in assoc_array_destroy_subtree()
408 BUG_ON(shortcut->next_node != cursor); in assoc_array_destroy_subtree()
410 parent = shortcut->back_pointer; in assoc_array_destroy_subtree()
411 slot = shortcut->parent_slot; in assoc_array_destroy_subtree()
413 kfree(shortcut); in assoc_array_destroy_subtree()
479 struct assoc_array_shortcut *shortcut, *new_s0; in assoc_array_insert_into_terminal_node() local
696 shortcut = assoc_array_ptr_to_shortcut(ptr); in assoc_array_insert_into_terminal_node()
697 edit->set_backpointers[i] = &shortcut->back_pointer; in assoc_array_insert_into_terminal_node()
797 struct assoc_array_shortcut *shortcut, *new_s0, *new_s1; in assoc_array_insert_mid_shortcut() local
804 shortcut = result->wrong_shortcut.shortcut; in assoc_array_insert_mid_shortcut()
824 if (!shortcut->back_pointer) { in assoc_array_insert_mid_shortcut()
826 } else if (assoc_array_ptr_is_node(shortcut->back_pointer)) { in assoc_array_insert_mid_shortcut()
827 node = assoc_array_ptr_to_node(shortcut->back_pointer); in assoc_array_insert_mid_shortcut()
828 edit->set[0].ptr = &node->slots[shortcut->parent_slot]; in assoc_array_insert_mid_shortcut()
833 edit->excised_meta[0] = assoc_array_shortcut_to_ptr(shortcut); in assoc_array_insert_mid_shortcut()
858 new_s0->back_pointer = shortcut->back_pointer; in assoc_array_insert_mid_shortcut()
859 new_s0->parent_slot = shortcut->parent_slot; in assoc_array_insert_mid_shortcut()
866 memcpy(new_s0->index_key, shortcut->index_key, in assoc_array_insert_mid_shortcut()
875 new_n0->back_pointer = shortcut->back_pointer; in assoc_array_insert_mid_shortcut()
876 new_n0->parent_slot = shortcut->parent_slot; in assoc_array_insert_mid_shortcut()
879 side = assoc_array_ptr_to_node(shortcut->next_node); in assoc_array_insert_mid_shortcut()
897 if (level < shortcut->skip_to_level) { in assoc_array_insert_mid_shortcut()
898 pr_devel("post-shortcut %d...%d\n", level, shortcut->skip_to_level); in assoc_array_insert_mid_shortcut()
899 keylen = round_up(shortcut->skip_to_level, ASSOC_ARRAY_KEY_CHUNK_SIZE); in assoc_array_insert_mid_shortcut()
910 new_s1->next_node = shortcut->next_node; in assoc_array_insert_mid_shortcut()
911 new_s1->skip_to_level = shortcut->skip_to_level; in assoc_array_insert_mid_shortcut()
915 memcpy(new_s1->index_key, shortcut->index_key, in assoc_array_insert_mid_shortcut()
928 new_n0->slots[sc_slot] = shortcut->next_node; in assoc_array_insert_mid_shortcut()
1348 struct assoc_array_shortcut *shortcut; in assoc_array_apply_edit() local
1385 shortcut = assoc_array_ptr_to_shortcut(ptr); in assoc_array_apply_edit()
1386 ptr = shortcut->back_pointer; in assoc_array_apply_edit()
1459 struct assoc_array_shortcut *shortcut, *new_s; in assoc_array_gc() local
1490 shortcut = assoc_array_ptr_to_shortcut(cursor); in assoc_array_gc()
1491 keylen = round_up(shortcut->skip_to_level, ASSOC_ARRAY_KEY_CHUNK_SIZE); in assoc_array_gc()
1497 pr_devel("dup shortcut %p -> %p\n", shortcut, new_s); in assoc_array_gc()
1498 memcpy(new_s, shortcut, (sizeof(struct assoc_array_shortcut) + in assoc_array_gc()
1501 new_s->parent_slot = shortcut->parent_slot; in assoc_array_gc()
1504 cursor = shortcut->next_node; in assoc_array_gc()
1695 shortcut = assoc_array_ptr_to_shortcut(ptr); in assoc_array_gc()
1696 slot = shortcut->parent_slot; in assoc_array_gc()
1697 cursor = shortcut->back_pointer; in assoc_array_gc()