Lines Matching defs:slot
29 int slot, ret;
41 slot = 0;
51 for (; slot < ASSOC_ARRAY_FAN_OUT; slot++) {
52 ptr = READ_ONCE(node->slots[slot]); /* Address dependency. */
70 * We are guaranteed to make progress, however, as the slot number for
76 slot = 0;
80 for (; slot < ASSOC_ARRAY_FAN_OUT; slot++) {
81 ptr = READ_ONCE(node->slots[slot]); /* Address dependency. */
91 slot = node->parent_slot;
99 slot = shortcut->parent_slot;
104 /* Ascend to next slot in parent node */
106 slot++;
155 int slot;
181 int slot;
193 * route to the destination. Eventually we'll come to a slot that is
207 slot = segments >> (level & ASSOC_ARRAY_KEY_CHUNK_MASK);
208 slot &= ASSOC_ARRAY_FAN_MASK;
209 ptr = READ_ONCE(node->slots[slot]); /* Address dependency. */
211 pr_devel("consider slot %x [ix=%d type=%lu]\n",
212 slot, level, (unsigned long)ptr & 3);
215 /* The node doesn't have a node/shortcut pointer in the slot
220 result->terminal_node.slot = slot;
226 /* There is a pointer to a node in the slot corresponding to
236 /* There is a shortcut in the slot corresponding to the index key
312 int slot;
323 for (slot = 0; slot < ASSOC_ARRAY_FAN_OUT; slot++) {
324 ptr = READ_ONCE(node->slots[slot]); /* Address dependency. */
349 int slot = -1;
362 pr_devel("[%d] shortcut\n", slot);
366 BUG_ON(slot != -1 && shortcut->parent_slot != slot);
369 slot = -1;
373 pr_devel("[%d] node\n", slot);
376 BUG_ON(slot != -1 && node->parent_slot != slot);
377 slot = 0;
381 for (; slot < ASSOC_ARRAY_FAN_OUT; slot++) {
382 struct assoc_array_ptr *ptr = node->slots[slot];
392 pr_devel("[%d] free leaf\n", slot);
398 slot = node->parent_slot;
411 slot = shortcut->parent_slot;
420 /* Ascend to next slot in parent node */
421 pr_devel("ascend to %p[%d]\n", parent, slot);
424 slot++;
486 int slot, next_slot, free_slot, i, j;
490 edit->segment_cache[ASSOC_ARRAY_FAN_OUT] = result->terminal_node.slot;
513 pr_devel("replace in slot %d\n", i);
521 /* If there is a free slot in this node then we can just insert the
525 pr_devel("insert in free slot %d\n", free_slot);
578 /* The old leaves all cluster in the same slot. We will need
584 /* Otherwise all the old leaves cluster in the same slot, but
585 * the new leaf wants to go into a different slot - so we
604 * new leaves want to cluster in the same slot.
627 * would match a slot with a meta pointer in it must be somewhere
632 slot = edit->segment_cache[i];
633 if (slot != 0xff)
635 if (edit->segment_cache[j] == slot)
639 pr_devel("same slot: %x %x [%02x]\n", i, j, slot);
642 BUG_ON(slot >= ASSOC_ARRAY_FAN_OUT);
644 new_n1->parent_slot = slot;
646 /* Metadata pointers cannot change slot */
652 BUG_ON(new_n0->slots[slot] != NULL);
653 new_n0->slots[slot] = assoc_array_node_to_ptr(new_n1);
661 if (edit->segment_cache[i] == slot) {
674 if (edit->segment_cache[ASSOC_ARRAY_FAN_OUT] != slot) {
715 * in the same slot, so we have to replace this node with a shortcut to
881 /* We need to know which slot in the new node is going to take a
887 pr_devel("new slot %lx >> %d -> %d\n",
892 * shortcut if its parent slot number doesn't change - but that's a
923 * use memory barriers to make sure the parent slot number is
924 * changed before the back pointer (the parent slot number is
934 /* Install the new leaf in a spare slot in the new node. */
975 * allowed as they indicate an empty slot but we have to allow them
997 * the slot corresponding to the index key that we have to
1006 /* We found a shortcut that didn't match our key in a slot we
1039 int slot;
1053 BUG_ON(collapse->slot >= ASSOC_ARRAY_FAN_OUT);
1055 collapse->node->slots[collapse->slot++] = assoc_array_leaf_to_ptr(leaf);
1088 int slot, i;
1107 for (slot = 0; slot < ASSOC_ARRAY_FAN_OUT; slot++) {
1108 ptr = node->slots[slot];
1127 /* In the simplest form of deletion we just clear the slot and release
1130 edit->dead_leaf = node->slots[slot];
1131 edit->set[0].ptr = &node->slots[slot];
1221 collapse.slot = 0;
1226 pr_devel("collapsed %d,%lu\n", collapse.slot, new_n0->nr_leaves_on_branch);
1227 BUG_ON(collapse.slot != new_n0->nr_leaves_on_branch - 1);
1465 int keylen, slot, nr_free, next_slot, i;
1516 slot = 0;
1520 for (; slot < ASSOC_ARRAY_FAN_OUT; slot++) {
1521 ptr = node->slots[slot];
1531 new_n->slots[slot] = ptr;
1535 new_ptr_pp = &new_n->slots[slot];
1548 for (slot = 0; slot < ASSOC_ARRAY_FAN_OUT; slot++) {
1549 ptr = new_n->slots[slot];
1560 for (slot = 0; slot < ASSOC_ARRAY_FAN_OUT; slot++) {
1564 ptr = new_n->slots[slot];
1580 slot, child->nr_leaves_on_branch, nr_free + 1,
1588 new_n->slots[slot] = NULL;
1590 if (slot < next_slot)
1591 next_slot = slot;
1606 slot, child->nr_leaves_on_branch, nr_free + 1,
1622 for (slot = 0; slot < ASSOC_ARRAY_FAN_OUT; slot++)
1623 if ((ptr = new_n->slots[slot]))
1631 slot = new_n->parent_slot;
1648 slot = new_s->parent_slot = s->parent_slot;
1659 new_s->parent_slot = slot;
1661 new_n->slots[slot] = ptr;
1676 slot = new_s->parent_slot;
1683 new_n->parent_slot = slot;
1691 n->slots[slot] = assoc_array_node_to_ptr(new_n);
1702 slot = shortcut->parent_slot;
1707 slot = node->parent_slot;
1712 slot++;