Lines Matching refs:gap
127 unsigned long gap[MAPLE_BIG_NODE_GAPS];
673 return node->ma64.gap;
890 * @offset: The offset of the highest sub-gap in this node.
898 meta->gap = offset;
907 * @offset: The offset of the highest sub-gap in this node.
937 meta->gap = 0;
955 * ma_meta_gap() - Get the largest gap location of a node from the metadata
962 return mn->ma64.meta.gap;
966 * ma_set_meta_gap() - Set the largest gap location in a nodes metadata
969 * @offset: The location of the largest gap.
977 meta->gap = offset;
1051 * mte_set_gap() - Set a maple node gap.
1053 * @gap: The offset of the gap to set
1054 * @val: The gap value
1057 unsigned char gap, unsigned long val)
1063 mte_to_node(mn)->ma64.gap[gap] = val;
1487 * mas_leaf_max_gap() - Returns the largest gap in a leaf node
1490 * Return: The maximum gap in the leaf.
1495 unsigned long pstart, gap, max_gap;
1507 gap = 0;
1510 if (gap > max_gap)
1511 max_gap = gap;
1512 gap = 0;
1514 gap++;
1517 if (gap > max_gap)
1518 max_gap = gap;
1524 * be skipped if there is a gap in slot 0.
1537 * Check end implied pivot which can only be a gap on the right most
1541 gap = ULONG_MAX - pivots[max_piv];
1542 if (gap > max_gap)
1543 max_gap = gap;
1547 /* data == no gap. */
1552 gap = pivots[i] - pstart;
1553 if (gap > max_gap)
1554 max_gap = gap;
1563 * ma_max_gap() - Get the maximum gap in a maple node (non-leaf)
1567 * @*off: Pointer to store the offset location of the gap.
1571 * Return: The maximum gap value
1593 * mas_max_gap() - find the largest gap in a non-leaf node and set the slot.
1596 * Return: The gap value.
1617 * mas_parent_gap() - Set the parent gap and any gaps above, as needed
1619 * @offset: The gap offset in the parent to set
1620 * @new: The new gap value.
1622 * Set the parent gap then continue to set the gap upwards, using the metadata
1813 memmove(b_node->gap + shift, b_node->gap, size);
1880 * To support gap tracking, all NULL entries are kept together and a node cannot
1983 memcpy(b_node->gap + mab_start, gaps + mas_start,
2058 gaps[--j] = b_node->gap[--i];
2125 b_node->gap[b_end] = mas->index - 1 - piv;
2150 b_node->gap[b_end] = piv - mas->last + 1;
2443 b_node->gap[b_node->b_end] = mas_max_gap(mas);
2672 * Updates gap as necessary.
3056 unsigned long *l_pivs, *pivs, gap;
3150 gap = mas_leaf_max_gap(mas);
3151 mte_set_gap(eparent, mte_parent_slot(mas->node), gap);
3152 gap = mas_leaf_max_gap(&l_mas);
3153 mte_set_gap(eparent, mte_parent_slot(l_mas.node), gap);
3210 memset(mast->bn->gap, 0, sizeof(unsigned long) * ARRAY_SIZE(mast->bn->gap));
4015 bool gap = false;
4017 gap |= !mt_slot_locked(mas->tree, slots, offset);
4018 gap |= !mt_slot_locked(mas->tree, slots, offset + 1);
4036 gap |= !mt_slot_locked(mas->tree, slots, offset + 2);
4047 * Only update gap when the new entry is empty or there is an empty
4050 if (!wr_mas->entry || gap)
4287 * tree. If the insert fits exactly into an existing gap with a value
4291 * the new range is within a gap but does not touch any other ranges,
4714 * highest gap address of a given size in a given node and descend.
4728 unsigned long gap = 0;
4752 gap = 0;
4754 gap = gaps[offset];
4756 gap = max - min + 1;
4758 if (gap) {
4759 if ((size <= gap) && (size <= mas->last - min + 1))
4763 /* Skip the next slot, it cannot be a gap. */
4788 *gap_max = min + gap - 1;
4811 unsigned long pivot, min, gap = 0;
4838 gap = gaps[offset];
4840 gap = min(pivot, mas->last) - max(mas->index, min) + 1;
4844 if (gap >= size) {
4956 * mas_awalk() - Allocation walk. Search from low address to high, for a gap of
4959 * @size: The size of the gap required
4961 * Search between @mas->index and @mas->last for a gap of @size.
4971 * no gap found. (return, slot == MAPLE_NODE_SLOTS)
4972 * found the gap. (return, slot != MAPLE_NODE_SLOTS)
4984 * searching for a gap in an empty tree.
4988 * @size: The size of the gap
5628 * Avoid overflow, assume a gap between each entry and a trailing null.
6825 pr_cont("%lx ", node->gap[i]);
6829 pr_cont("%lu ", node->gap[i]);
6832 pr_cont("| %02X %02X| ", node->meta.end, node->meta.gap);
6920 * Calculate the maximum gap in a node and check if that's what is reported in
6928 unsigned long gap = 0, max_gap = 0;
6938 if (gap > max_gap)
6939 max_gap = gap;
6940 gap = 0;
6943 gap++;
6954 gap = p_end - p_start + 1;
6958 gap = gaps[i];
6961 if (gap > p_end - p_start + 1) {
6963 mas_mn(mas), i, gap, p_end, p_start,
6965 MT_BUG_ON(mas->tree, gap > p_end - p_start + 1);
6969 if (gap > max_gap)
6970 max_gap = gap;
6981 pr_err("gap offset %p[%u] is invalid\n", node, offset);
6986 pr_err("gap %p[%u] is not the largest gap %lu\n",
6994 pr_err("gap %p[%u] beyond node limit != 0\n",
7008 pr_err("gap %p[%u] != %lu\n", p_mn, p_slot, max_gap);
7201 * 2. The gap is correctly set in the parents