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()
796 struct assoc_array_shortcut *shortcut, *new_s0, *new_s1; in assoc_array_insert_mid_shortcut() local
803 shortcut = result->wrong_shortcut.shortcut; in assoc_array_insert_mid_shortcut()
823 if (!shortcut->back_pointer) { in assoc_array_insert_mid_shortcut()
825 } else if (assoc_array_ptr_is_node(shortcut->back_pointer)) { in assoc_array_insert_mid_shortcut()
826 node = assoc_array_ptr_to_node(shortcut->back_pointer); in assoc_array_insert_mid_shortcut()
827 edit->set[0].ptr = &node->slots[shortcut->parent_slot]; in assoc_array_insert_mid_shortcut()
832 edit->excised_meta[0] = assoc_array_shortcut_to_ptr(shortcut); in assoc_array_insert_mid_shortcut()
857 new_s0->back_pointer = shortcut->back_pointer; in assoc_array_insert_mid_shortcut()
858 new_s0->parent_slot = shortcut->parent_slot; in assoc_array_insert_mid_shortcut()
865 memcpy(new_s0->index_key, shortcut->index_key, in assoc_array_insert_mid_shortcut()
874 new_n0->back_pointer = shortcut->back_pointer; in assoc_array_insert_mid_shortcut()
875 new_n0->parent_slot = shortcut->parent_slot; in assoc_array_insert_mid_shortcut()
878 side = assoc_array_ptr_to_node(shortcut->next_node); in assoc_array_insert_mid_shortcut()
896 if (level < shortcut->skip_to_level) { in assoc_array_insert_mid_shortcut()
897 pr_devel("post-shortcut %d...%d\n", level, shortcut->skip_to_level); in assoc_array_insert_mid_shortcut()
898 keylen = round_up(shortcut->skip_to_level, ASSOC_ARRAY_KEY_CHUNK_SIZE); in assoc_array_insert_mid_shortcut()
909 new_s1->next_node = shortcut->next_node; in assoc_array_insert_mid_shortcut()
910 new_s1->skip_to_level = shortcut->skip_to_level; in assoc_array_insert_mid_shortcut()
914 memcpy(new_s1->index_key, shortcut->index_key, in assoc_array_insert_mid_shortcut()
927 new_n0->slots[sc_slot] = shortcut->next_node; in assoc_array_insert_mid_shortcut()
1347 struct assoc_array_shortcut *shortcut; in assoc_array_apply_edit() local
1384 shortcut = assoc_array_ptr_to_shortcut(ptr); in assoc_array_apply_edit()
1385 ptr = shortcut->back_pointer; in assoc_array_apply_edit()
1458 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, struct_size(new_s, index_key, keylen)); in assoc_array_gc()
1500 new_s->parent_slot = shortcut->parent_slot; in assoc_array_gc()
1503 cursor = shortcut->next_node; in assoc_array_gc()
1701 shortcut = assoc_array_ptr_to_shortcut(ptr); in assoc_array_gc()
1702 slot = shortcut->parent_slot; in assoc_array_gc()
1703 cursor = shortcut->back_pointer; in assoc_array_gc()