Lines Matching defs:gap

600 		return node->ma64.gap;
602 return node->cp.gap;
793 * @offset: The offset of the highest sub-gap in this node.
801 meta->gap = offset;
838 meta->gap = 0;
856 * ma_meta_gap() - Get the largest gap location of a node from the metadata
861 return mn->ma64.meta.gap;
865 * ma_set_meta_gap() - Set the largest gap location in a nodes metadata
868 * @offset: The location of the largest gap.
876 meta->gap = offset;
1310 unsigned long pstart, gap, max_gap;
1316 gap = 0;
1319 if (gap > max_gap)
1320 max_gap = gap;
1321 gap = 0;
1323 gap++;
1326 if (gap > max_gap)
1327 max_gap = gap;
1333 * be skipped if there is a gap in slot 0.
1345 * Check end implied pivot which can only be a gap on the right most
1349 gap = ULONG_MAX - pivots[max_piv];
1350 if (gap > max_gap)
1351 max_gap = gap;
1358 /* data == no gap. */
1363 gap = pivots[i] - pstart;
1364 if (gap > max_gap)
1365 max_gap = gap;
1374 * mas_leaf_max_gap() - Returns the largest gap in a leaf node
1377 * Return: The maximum gap in the leaf.
1395 * ma_max_gap() - Get the maximum gap in a maple node (non-leaf)
1399 * @off: Pointer to store the offset location of the gap.
1403 * Return: The maximum gap value
1425 * mas_max_gap() - find the largest gap in a non-leaf node and set the slot.
1428 * Return: The gap value.
1449 * mas_parent_gap() - Set the parent gap and any gaps above, as needed
1451 * @offset: The gap offset in the parent to set
1452 * @new: The new gap value.
1454 * Set the parent gap then continue to set the gap upwards, using the metadata
2074 * Updates gap as necessary.
2568 cp->gap[d] = ma_leaf_max_gap(mn, mt, slot_min,
2578 cp->gap[d] = gaps[gap_slot];
3219 bool gap = false;
3221 gap |= !mt_slot_locked(mas->tree, slots, offset);
3222 gap |= !mt_slot_locked(mas->tree, slots, offset + 1);
3241 gap |= !mt_slot_locked(mas->tree, slots, offset + 2);
3250 * Only update gap when the new entry is empty or there is an empty
3253 if (!wr_mas->entry || gap)
3736 * tree. If the insert fits exactly into an existing gap with a value
3740 * the new range is within a gap but does not touch any other ranges,
4196 * highest gap address of a given size in a given node and descend.
4210 unsigned long gap = 0;
4234 gap = 0;
4236 gap = gaps[offset];
4238 gap = max - min + 1;
4240 if (gap) {
4241 if ((size <= gap) && (size <= mas->last - min + 1))
4245 /* Skip the next slot, it cannot be a gap. */
4270 *gap_max = min + gap - 1;
4293 unsigned long pivot, min, gap = 0;
4320 gap = gaps[offset];
4322 gap = min(pivot, mas->last) - max(mas->index, min) + 1;
4326 if (gap >= size) {
4434 * mas_awalk() - Allocation walk. Search from low address to high, for a gap of
4437 * @size: The size of the gap required
4439 * Search between @mas->index and @mas->last for a gap of @size.
4449 * no gap found. (return, error == -EBUSY)
4450 * found the gap. (return)
4462 * searching for a gap in an empty tree.
4466 * @size: The size of the gap
6546 pr_cont("%lx ", node->gap[i]);
6549 pr_cont("%lu ", node->gap[i]);
6552 pr_cont("| %02X %02X| ", node->meta.end, node->meta.gap);
6644 * Calculate the maximum gap in a node and check if that's what is reported in
6652 unsigned long gap = 0, max_gap = 0;
6662 if (gap > max_gap)
6663 max_gap = gap;
6664 gap = 0;
6667 gap++;
6678 gap = p_end - p_start + 1;
6682 gap = gaps[i];
6685 if (gap > p_end - p_start + 1) {
6687 mas_mn(mas), i, gap, p_end, p_start,
6689 MT_BUG_ON(mas->tree, gap > p_end - p_start + 1);
6693 if (gap > max_gap)
6694 max_gap = gap;
6706 pr_err("gap offset " PTR_FMT "[%u] is invalid\n", node, offset);
6711 pr_err("gap " PTR_FMT "[%u] is not the largest gap %lu\n",
6718 pr_err("gap " PTR_FMT "[%u] beyond node limit != 0\n",
6732 pr_err("gap " PTR_FMT "[%u] != %lu\n", p_mn, p_slot, max_gap);
6925 * 2. The gap is correctly set in the parents