Lines Matching full:gap

143 			unsigned long gap[MAPLE_BIG_NODE_GAPS];  member
693 return node->ma64.gap; in ma_gaps()
881 * @offset: The offset of the highest sub-gap in this node.
889 meta->gap = offset; in ma_set_meta()
926 meta->gap = 0; in mt_clear_meta()
944 * ma_meta_gap() - Get the largest gap location of a node from the metadata
949 return mn->ma64.meta.gap; in ma_meta_gap()
953 * ma_set_meta_gap() - Set the largest gap location in a nodes metadata
956 * @offset: The location of the largest gap.
964 meta->gap = offset; in ma_set_meta_gap()
1038 * mte_set_gap() - Set a maple node gap.
1040 * @gap: The offset of the gap to set
1041 * @val: The gap value
1044 unsigned char gap, unsigned long val) in mte_set_gap() argument
1050 mte_to_node(mn)->ma64.gap[gap] = val; in mte_set_gap()
1477 * mas_leaf_max_gap() - Returns the largest gap in a leaf node
1480 * Return: The maximum gap in the leaf.
1485 unsigned long pstart, gap, max_gap; in mas_leaf_max_gap() local
1497 gap = 0; in mas_leaf_max_gap()
1500 if (gap > max_gap) in mas_leaf_max_gap()
1501 max_gap = gap; in mas_leaf_max_gap()
1502 gap = 0; in mas_leaf_max_gap()
1504 gap++; in mas_leaf_max_gap()
1507 if (gap > max_gap) in mas_leaf_max_gap()
1508 max_gap = gap; in mas_leaf_max_gap()
1514 * be skipped if there is a gap in slot 0. in mas_leaf_max_gap()
1527 * Check end implied pivot which can only be a gap on the right most in mas_leaf_max_gap()
1531 gap = ULONG_MAX - pivots[max_piv]; in mas_leaf_max_gap()
1532 if (gap > max_gap) in mas_leaf_max_gap()
1533 max_gap = gap; in mas_leaf_max_gap()
1540 /* data == no gap. */ in mas_leaf_max_gap()
1545 gap = pivots[i] - pstart; in mas_leaf_max_gap()
1546 if (gap > max_gap) in mas_leaf_max_gap()
1547 max_gap = gap; in mas_leaf_max_gap()
1556 * ma_max_gap() - Get the maximum gap in a maple node (non-leaf)
1560 * @off: Pointer to store the offset location of the gap.
1564 * Return: The maximum gap value
1586 * mas_max_gap() - find the largest gap in a non-leaf node and set the slot.
1589 * Return: The gap value.
1610 * mas_parent_gap() - Set the parent gap and any gaps above, as needed
1612 * @offset: The gap offset in the parent to set
1613 * @new: The new gap value.
1615 * Set the parent gap then continue to set the gap upwards, using the metadata
1806 memmove(b_node->gap + shift, b_node->gap, size); in mab_shift_right()
1873 * To support gap tracking, all NULL entries are kept together and a node cannot in mab_calc_split()
1964 memcpy(b_node->gap + mab_start, gaps + mas_start, in mas_mab_cp()
2025 gaps[--j] = b_node->gap[--i]; in mab_mas_cp()
2092 b_node->gap[b_end] = mas->index - 1 - piv; in mas_store_b_node()
2117 b_node->gap[b_end] = piv - mas->last + 1; in mas_store_b_node()
2409 b_node->gap[b_node->b_end] = mas_max_gap(mas); in mab_set_b_end()
2639 * Updates gap as necessary.
3014 unsigned long *l_pivs, *pivs, gap; in mas_destroy_rebalance() local
3103 gap = mas_leaf_max_gap(mas); in mas_destroy_rebalance()
3104 mte_set_gap(eparent, mte_parent_slot(mas->node), gap); in mas_destroy_rebalance()
3105 gap = mas_leaf_max_gap(&l_mas); in mas_destroy_rebalance()
3106 mte_set_gap(eparent, mte_parent_slot(l_mas.node), gap); in mas_destroy_rebalance()
3886 bool gap = false; in mas_wr_slot_store() local
3888 gap |= !mt_slot_locked(mas->tree, slots, offset); in mas_wr_slot_store()
3889 gap |= !mt_slot_locked(mas->tree, slots, offset + 1); in mas_wr_slot_store()
3908 gap |= !mt_slot_locked(mas->tree, slots, offset + 2); in mas_wr_slot_store()
3917 * Only update gap when the new entry is empty or there is an empty in mas_wr_slot_store()
3920 if (!wr_mas->entry || gap) in mas_wr_slot_store()
4276 * tree. If the insert fits exactly into an existing gap with a value in mas_insert()
4280 * the new range is within a gap but does not touch any other ranges, in mas_insert()
4739 * highest gap address of a given size in a given node and descend.
4753 unsigned long gap = 0; in mas_rev_awalk() local
4777 gap = 0; in mas_rev_awalk()
4779 gap = gaps[offset]; in mas_rev_awalk()
4781 gap = max - min + 1; in mas_rev_awalk()
4783 if (gap) { in mas_rev_awalk()
4784 if ((size <= gap) && (size <= mas->last - min + 1)) in mas_rev_awalk()
4788 /* Skip the next slot, it cannot be a gap. */ in mas_rev_awalk()
4813 *gap_max = min + gap - 1; in mas_rev_awalk()
4836 unsigned long pivot, min, gap = 0; in mas_anode_descend() local
4863 gap = gaps[offset]; in mas_anode_descend()
4865 gap = min(pivot, mas->last) - max(mas->index, min) + 1; in mas_anode_descend()
4869 if (gap >= size) { in mas_anode_descend()
4977 * mas_awalk() - Allocation walk. Search from low address to high, for a gap of
4980 * @size: The size of the gap required
4982 * Search between @mas->index and @mas->last for a gap of @size.
4992 * no gap found. (return, error == -EBUSY) in mas_awalk()
4993 * found the gap. (return) in mas_awalk()
5005 * searching for a gap in an empty tree.
5009 * @size: The size of the gap
5603 * Avoid overflow, assume a gap between each entry and a trailing null. in mas_expected_entries()
7161 pr_cont("%lx ", node->gap[i]); in mt_dump_arange64()
7164 pr_cont("%lu ", node->gap[i]); in mt_dump_arange64()
7167 pr_cont("| %02X %02X| ", node->meta.end, node->meta.gap); in mt_dump_arange64()
7259 * Calculate the maximum gap in a node and check if that's what is reported in
7267 unsigned long gap = 0, max_gap = 0; in mas_validate_gaps() local
7277 if (gap > max_gap) in mas_validate_gaps()
7278 max_gap = gap; in mas_validate_gaps()
7279 gap = 0; in mas_validate_gaps()
7282 gap++; in mas_validate_gaps()
7293 gap = p_end - p_start + 1; in mas_validate_gaps()
7297 gap = gaps[i]; in mas_validate_gaps()
7300 if (gap > p_end - p_start + 1) { in mas_validate_gaps()
7302 mas_mn(mas), i, gap, p_end, p_start, in mas_validate_gaps()
7304 MT_BUG_ON(mas->tree, gap > p_end - p_start + 1); in mas_validate_gaps()
7308 if (gap > max_gap) in mas_validate_gaps()
7309 max_gap = gap; in mas_validate_gaps()
7321 pr_err("gap offset " PTR_FMT "[%u] is invalid\n", node, offset); in mas_validate_gaps()
7326 pr_err("gap " PTR_FMT "[%u] is not the largest gap %lu\n", in mas_validate_gaps()
7333 pr_err("gap " PTR_FMT "[%u] beyond node limit != 0\n", in mas_validate_gaps()
7347 pr_err("gap " PTR_FMT "[%u] != %lu\n", p_mn, p_slot, max_gap); in mas_validate_gaps()
7540 * 2. The gap is correctly set in the parents